hunyuan-t commited on
Commit
20cbf02
·
verified ·
1 Parent(s): 100edcb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -46,15 +46,10 @@ def respond(
46
  response = ""
47
 
48
  for event in completion:
49
- print(222222222222)
50
- print(event)
51
- print(type(event))
52
- print(222222222222)
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="hunyuan-turbos",
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
  )