Download test_chatbot.py from arkapravac366/Eminem-Data-Entry: direct link, hf CLI and curl.
- Browser
- Download file 861 Bytes
-
https://huggingface.co/arkapravac366/Eminem-Data-Entry/resolve/main/test_chatbot.py
- Command line
-
hf download hf://arkapravac366/Eminem-Data-Entry/test_chatbot.py
-
curl -L -o test_chatbot.py https://huggingface.co/arkapravac366/Eminem-Data-Entry/resolve/main/test_chatbot.py
861 Bytes
| import os | |
| import sys | |
| sys.path.append(os.getcwd()) | |
| from chatbot import ChatBot | |
| import time | |
| def test_chatbot(): | |
| bot = ChatBot() | |
| # Wait for model to load | |
| print('Waiting for model to initialize...') | |
| time.sleep(5) | |
| # Test cases | |
| test_inputs = [ | |
| 'How much in total donations?', | |
| 'How do I make a donation?', | |
| 'What categories can I donate to?', | |
| 'Show me recent donations', | |
| 'How do I generate a report?', | |
| 'Can you help me?' | |
| ] | |
| print('\nTesting ChatBot responses...') | |
| print('-' * 50) | |
| for input_text in test_inputs: | |
| print(f'\nInput: {input_text}') | |
| response = bot.get_response(input_text) | |
| print(f'Response: {response}') | |
| print('-' * 50) | |
| time.sleep(1) # Add delay between requests | |
| if __name__ == '__main__': | |
| test_chatbot() |