Raullen commited on
Commit
7c937ef
·
verified ·
1 Parent(s): 548c13e

fix(gradio6): drop theme + removed btn args

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -143,10 +143,8 @@ FOOTER_MD = """
143
  <sub>Powered by <a href="https://quicksilverpro.io">QuickSilver Pro</a> — open-source LLM inference, OpenAI-compatible, ~20% below OpenRouter / Together / Fireworks. Built by <a href="https://quicksilverpro.io">MachineFi Labs</a>.</sub>
144
  """
145
 
146
- with gr.Blocks(
147
- title="QuickSilver Pro Chat",
148
- theme=gr.themes.Soft(primary_hue="indigo", secondary_hue="purple"),
149
- ) as demo:
150
  gr.Markdown(HEADER_MD)
151
 
152
  with gr.Row():
@@ -170,6 +168,9 @@ with gr.Blocks(
170
  label="Max tokens", minimum=64, maximum=4096, step=64, value=1024
171
  )
172
  with gr.Column(scale=3):
 
 
 
173
  gr.ChatInterface(
174
  fn=respond,
175
  additional_inputs=[model_dropdown, system_prompt, temperature, max_tokens],
@@ -180,10 +181,6 @@ with gr.Blocks(
180
  ["Translate 'Hello, how are you?' into formal Japanese, Hindi, and Russian"],
181
  ],
182
  cache_examples=False,
183
- submit_btn="Send",
184
- retry_btn="Retry",
185
- undo_btn="Undo",
186
- clear_btn="Clear",
187
  )
188
 
189
  gr.Markdown(FOOTER_MD)
 
143
  <sub>Powered by <a href="https://quicksilverpro.io">QuickSilver Pro</a> — open-source LLM inference, OpenAI-compatible, ~20% below OpenRouter / Together / Fireworks. Built by <a href="https://quicksilverpro.io">MachineFi Labs</a>.</sub>
144
  """
145
 
146
+ # theme moved to launch() in Gradio 6, dropped here to stay forward-compatible
147
+ with gr.Blocks(title="QuickSilver Pro Chat") as demo:
 
 
148
  gr.Markdown(HEADER_MD)
149
 
150
  with gr.Row():
 
168
  label="Max tokens", minimum=64, maximum=4096, step=64, value=1024
169
  )
170
  with gr.Column(scale=3):
171
+ # Gradio 6.0 removed submit_btn / retry_btn / undo_btn / clear_btn args
172
+ # in favor of a more opinionated default layout; dropping them keeps
173
+ # this compatible with both 5.x and 6.x.
174
  gr.ChatInterface(
175
  fn=respond,
176
  additional_inputs=[model_dropdown, system_prompt, temperature, max_tokens],
 
181
  ["Translate 'Hello, how are you?' into formal Japanese, Hindi, and Russian"],
182
  ],
183
  cache_examples=False,
 
 
 
 
184
  )
185
 
186
  gr.Markdown(FOOTER_MD)