Sachi Wagaarachchi commited on
Commit
b264ac6
·
1 Parent(s): c285061

bugfixes, update response streaming, thought

Browse files
Files changed (1) hide show
  1. src/app.py +5 -3
src/app.py CHANGED
@@ -17,10 +17,12 @@ try:
17
  import spaces
18
  @spaces.GPU(duration=60)
19
  def run_respond(*args, **kwargs):
20
- return respond(*args, **kwargs)
 
21
  except ImportError:
22
  def run_respond(*args, **kwargs):
23
- return respond(*args, **kwargs)
 
24
 
25
  def respond(
26
  message,
@@ -102,7 +104,7 @@ def respond(
102
 
103
  # Create Gradio interface
104
  demo = gr.ChatInterface(
105
- respond,
106
  additional_inputs=[
107
  gr.Dropdown(
108
  choices=["Qwen3-14B", "Qwen3-8B", "Qwen3-0.6B"],
 
17
  import spaces
18
  @spaces.GPU(duration=60)
19
  def run_respond(*args, **kwargs):
20
+ for token in respond(*args, **kwargs):
21
+ yield token
22
  except ImportError:
23
  def run_respond(*args, **kwargs):
24
+ for token in respond(*args, **kwargs):
25
+ yield token
26
 
27
  def respond(
28
  message,
 
104
 
105
  # Create Gradio interface
106
  demo = gr.ChatInterface(
107
+ run_respond,
108
  additional_inputs=[
109
  gr.Dropdown(
110
  choices=["Qwen3-14B", "Qwen3-8B", "Qwen3-0.6B"],