Spaces:
Sleeping
Sleeping
debugging
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import random
|
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
# import lines go at the top: any libraries I need to import go up here ^^
|
| 5 |
|
| 6 |
-
client = InferenceClient("HuggingFaceH4/
|
| 7 |
|
| 8 |
def respond(message, history):
|
| 9 |
|
|
@@ -18,13 +18,12 @@ def respond(message, history):
|
|
| 18 |
|
| 19 |
return response['choices'][0]['message']['content'].strip()
|
| 20 |
|
| 21 |
-
def yes_or_no(message, history):
|
| 22 |
-
return random.choice(['Yes', 'No', 'Maybe', 'Ask Again'])
|
| 23 |
-
|
| 24 |
def echo(message, history):
|
| 25 |
return message
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
chatbot = gr.ChatInterface(respond, type = "messages")
|
| 29 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 30 |
|
|
|
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
# import lines go at the top: any libraries I need to import go up here ^^
|
| 5 |
|
| 6 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 7 |
|
| 8 |
def respond(message, history):
|
| 9 |
|
|
|
|
| 18 |
|
| 19 |
return response['choices'][0]['message']['content'].strip()
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
def echo(message, history):
|
| 22 |
return message
|
| 23 |
|
| 24 |
+
def yes_or_no(message, history):
|
| 25 |
+
return random.choice(['Yes', 'No', 'Maybe', 'Ask Again'])
|
| 26 |
+
|
| 27 |
chatbot = gr.ChatInterface(respond, type = "messages")
|
| 28 |
# defining my chatbot so that the user can interact and see their conversation history and send new messages
|
| 29 |
|