Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,15 +46,10 @@ def respond(
|
|
| 46 |
response = ""
|
| 47 |
|
| 48 |
for event in completion:
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
print(
|
| 52 |
-
print(
|
| 53 |
-
token = event['choices'][0].delta['content']
|
| 54 |
-
if message.find('写一篇关于青春的五言绝句') != -1:
|
| 55 |
-
print(11111111111)
|
| 56 |
-
print(token)
|
| 57 |
-
|
| 58 |
response += token
|
| 59 |
yield response
|
| 60 |
except Exception as e:
|
|
@@ -76,7 +71,7 @@ latex_delimiters = [
|
|
| 76 |
chatbot = gr.Chatbot(latex_delimiters=latex_delimiters, scale=9)
|
| 77 |
|
| 78 |
demo = gr.ChatInterface(respond,
|
| 79 |
-
title="
|
| 80 |
examples=example_prompts,
|
| 81 |
chatbot=chatbot
|
| 82 |
)
|
|
|
|
| 46 |
response = ""
|
| 47 |
|
| 48 |
for event in completion:
|
| 49 |
+
token = event.choices[0].delta.content
|
| 50 |
+
# if message.find('写一篇关于青春的五言绝句') != -1:
|
| 51 |
+
# print(11111111111)
|
| 52 |
+
# print(event)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
response += token
|
| 54 |
yield response
|
| 55 |
except Exception as e:
|
|
|
|
| 71 |
chatbot = gr.Chatbot(latex_delimiters=latex_delimiters, scale=9)
|
| 72 |
|
| 73 |
demo = gr.ChatInterface(respond,
|
| 74 |
+
title="Hunyuan T1",
|
| 75 |
examples=example_prompts,
|
| 76 |
chatbot=chatbot
|
| 77 |
)
|