nanova commited on
Commit
2d0b3a0
·
1 Parent(s): f03e102
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -70,8 +70,8 @@ def respond(
70
  if 'choices' in json_response and len(json_response['choices']) > 0:
71
  content = json_response['choices'][0].get('message', {}).get('content', '')
72
  if content:
73
- # if '<think>' in content and '</think>' in content:
74
- # content = content.split('</think>')[-1].strip()
75
  print(f"[INFO] response: {content}")
76
  return content
77
  return "Service temporarily unavailable"
@@ -101,4 +101,4 @@ demo = gr.ChatInterface(
101
 
102
 
103
  if __name__ == "__main__":
104
- demo.launch(share=True)
 
70
  if 'choices' in json_response and len(json_response['choices']) > 0:
71
  content = json_response['choices'][0].get('message', {}).get('content', '')
72
  if content:
73
+ if '<think>' in content and '</think>' in content:
74
+ content = content.split('</think>')[-1].strip()
75
  print(f"[INFO] response: {content}")
76
  return content
77
  return "Service temporarily unavailable"
 
101
 
102
 
103
  if __name__ == "__main__":
104
+ demo.launch()