Karthik Raja
commited on
correct imports
Browse files
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
message_list = []
|
| 4 |
response_list = []
|
| 5 |
from transformers import pipeline
|
|
@@ -12,6 +14,7 @@ messages = [
|
|
| 12 |
]
|
| 13 |
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3",max_new_tokens=5000)
|
| 14 |
|
|
|
|
| 15 |
def mini_chatbot(message, history):
|
| 16 |
conversation = Conversation(text=message,
|
| 17 |
past_user_inputs=message_list,
|
|
|
|
| 1 |
+
from transformers import Conversation
|
| 2 |
+
from huggingface_hub import login
|
| 3 |
+
import os
|
| 4 |
+
login(token = os.getenv("HF_TOKEN") )
|
| 5 |
message_list = []
|
| 6 |
response_list = []
|
| 7 |
from transformers import pipeline
|
|
|
|
| 14 |
]
|
| 15 |
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3",max_new_tokens=5000)
|
| 16 |
|
| 17 |
+
|
| 18 |
def mini_chatbot(message, history):
|
| 19 |
conversation = Conversation(text=message,
|
| 20 |
past_user_inputs=message_list,
|