Spaces:
Build error
Build error
Update requirements.txt
Browse files- requirements.txt +11 -3
requirements.txt
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
chatbot = pipeline("text-generation", model="microsoft/DialoGPT-medium")
|
| 4 |
+
|
| 5 |
+
while True:
|
| 6 |
+
user_input = input("You: ")
|
| 7 |
+
if user_input.lower() == "exit":
|
| 8 |
+
break
|
| 9 |
+
response = chatbot(user_input, max_length=100, pad_token_id=50256)
|
| 10 |
+
print("Bot:", response[0]['generated_text'])
|
| 11 |
+
|
| 12 |
|
| 13 |
|