hunyuan-t commited on
Commit
fb60a3b
·
verified ·
1 Parent(s): 4603974

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -54,7 +54,7 @@ def respond(
54
  response += '> **Start thinking**\n\n'
55
  is_reasoning_start = False
56
  token = event.choices[0].delta.reasoning_content# Wrap reasoning_content in a span with a lighter color
57
- response += f'<span style="color: #999999;">{token}</span>'
58
  else:
59
  if is_reasoning_end:
60
  response += '> **End thinking**\n\n'
@@ -81,10 +81,23 @@ latex_delimiters = [
81
 
82
  chatbot = gr.Chatbot(latex_delimiters=latex_delimiters, scale=9)
83
 
 
 
 
 
 
 
 
 
 
 
 
84
  demo = gr.ChatInterface(respond,
85
  title="Hunyuan T1",
86
  examples=example_prompts,
87
- chatbot=chatbot
 
 
88
  )
89
 
90
  if __name__ == "__main__":
 
54
  response += '> **Start thinking**\n\n'
55
  is_reasoning_start = False
56
  token = event.choices[0].delta.reasoning_content# Wrap reasoning_content in a span with a lighter color
57
+ response += token
58
  else:
59
  if is_reasoning_end:
60
  response += '> **End thinking**\n\n'
 
81
 
82
  chatbot = gr.Chatbot(latex_delimiters=latex_delimiters, scale=9)
83
 
84
+ css = """
85
+ <style>
86
+ .reasoning-content {
87
+ color: #999999;
88
+ }
89
+ .normal-content {
90
+ color: #000000;
91
+ }
92
+ </style>
93
+ """
94
+
95
  demo = gr.ChatInterface(respond,
96
  title="Hunyuan T1",
97
  examples=example_prompts,
98
+ chatbot=chatbot,
99
+ css=css
100
+
101
  )
102
 
103
  if __name__ == "__main__":