Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -41,13 +41,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
41 |
)
|
42 |
|
43 |
def update_llama_model(new_model):
|
44 |
-
|
45 |
name=new_model,
|
46 |
src=sambanova_gradio.registry,
|
47 |
multimodal=True,
|
48 |
fill_height=True
|
49 |
)
|
50 |
-
return llama_interface
|
51 |
|
52 |
llama_model.change(
|
53 |
fn=update_llama_model,
|
@@ -77,12 +76,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
77 |
)
|
78 |
|
79 |
def update_gemini_model(new_model):
|
80 |
-
|
81 |
name=new_model,
|
82 |
src=gemini_gradio.registry,
|
83 |
fill_height=True
|
84 |
)
|
85 |
-
return gemini_interface
|
86 |
|
87 |
gemini_model.change(
|
88 |
fn=update_gemini_model,
|
@@ -124,13 +122,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
124 |
)
|
125 |
|
126 |
def update_model(new_model):
|
127 |
-
|
128 |
name=new_model,
|
129 |
src=openai_gradio.registry,
|
130 |
accept_token=True,
|
131 |
fill_height=True
|
132 |
)
|
133 |
-
return chatgpt_interface
|
134 |
|
135 |
model_choice.change(
|
136 |
fn=update_model,
|
@@ -160,13 +157,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
160 |
)
|
161 |
|
162 |
def update_claude_model(new_model):
|
163 |
-
|
164 |
name=new_model,
|
165 |
src=anthropic_gradio.registry,
|
166 |
accept_token=True,
|
167 |
fill_height=True
|
168 |
)
|
169 |
-
return claude_interface
|
170 |
|
171 |
claude_model.change(
|
172 |
fn=update_claude_model,
|
@@ -192,12 +188,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
192 |
)
|
193 |
|
194 |
def update_grok_model(new_model):
|
195 |
-
|
196 |
name=new_model,
|
197 |
src=xai_gradio.registry,
|
198 |
fill_height=True
|
199 |
)
|
200 |
-
return grok_interface
|
201 |
|
202 |
grok_model.change(
|
203 |
fn=update_grok_model,
|
@@ -230,12 +225,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
230 |
)
|
231 |
|
232 |
def update_groq_model(new_model):
|
233 |
-
|
234 |
name=new_model,
|
235 |
src=groq_gradio.registry,
|
236 |
fill_height=True
|
237 |
)
|
238 |
-
return groq_interface
|
239 |
|
240 |
groq_model.change(
|
241 |
fn=update_groq_model,
|
@@ -277,12 +271,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
277 |
)
|
278 |
|
279 |
def update_hyperbolic_model(new_model):
|
280 |
-
|
281 |
name=new_model,
|
282 |
src=hyperbolic_gradio.registry,
|
283 |
fill_height=True
|
284 |
)
|
285 |
-
return hyperbolic_interface
|
286 |
|
287 |
hyperbolic_model.change(
|
288 |
fn=update_hyperbolic_model,
|
@@ -316,12 +309,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
316 |
)
|
317 |
|
318 |
def update_qwen_model(new_model):
|
319 |
-
|
320 |
name=new_model,
|
321 |
src=hyperbolic_gradio.registry,
|
322 |
fill_height=True
|
323 |
)
|
324 |
-
return qwen_interface
|
325 |
|
326 |
qwen_model.change(
|
327 |
fn=update_qwen_model,
|
@@ -364,13 +356,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
364 |
)
|
365 |
|
366 |
def update_perplexity_model(new_model):
|
367 |
-
|
368 |
name=new_model,
|
369 |
src=perplexity_gradio.registry,
|
370 |
accept_token=True,
|
371 |
fill_height=True
|
372 |
)
|
373 |
-
return perplexity_interface
|
374 |
|
375 |
perplexity_model.change(
|
376 |
fn=update_perplexity_model,
|
@@ -429,12 +420,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
429 |
)
|
430 |
|
431 |
def update_mistral_model(new_model):
|
432 |
-
|
433 |
name=new_model,
|
434 |
src=mistral_gradio.registry,
|
435 |
fill_height=True
|
436 |
)
|
437 |
-
return mistral_interface
|
438 |
|
439 |
mistral_model.change(
|
440 |
fn=update_mistral_model,
|
@@ -470,12 +460,11 @@ with gr.Blocks(fill_height=True) as demo:
|
|
470 |
)
|
471 |
|
472 |
def update_fireworks_model(new_model):
|
473 |
-
|
474 |
name=new_model,
|
475 |
src=fireworks_gradio.registry,
|
476 |
fill_height=True
|
477 |
)
|
478 |
-
return fireworks_interface
|
479 |
|
480 |
fireworks_model.change(
|
481 |
fn=update_fireworks_model,
|
@@ -507,13 +496,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
507 |
)
|
508 |
|
509 |
def update_cerebras_model(new_model):
|
510 |
-
|
511 |
name=new_model,
|
512 |
src=cerebras_gradio.registry,
|
513 |
accept_token=True, # Added token acceptance
|
514 |
fill_height=True
|
515 |
)
|
516 |
-
return cerebras_interface
|
517 |
|
518 |
cerebras_model.change(
|
519 |
fn=update_cerebras_model,
|
@@ -578,13 +566,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
578 |
)
|
579 |
|
580 |
def update_together_model(new_model):
|
581 |
-
|
582 |
name=new_model,
|
583 |
src=together_gradio.registry,
|
584 |
multimodal=True,
|
585 |
fill_height=True
|
586 |
)
|
587 |
-
return together_interface
|
588 |
|
589 |
together_model.change(
|
590 |
fn=update_together_model,
|
@@ -655,13 +642,12 @@ with gr.Blocks(fill_height=True) as demo:
|
|
655 |
)
|
656 |
|
657 |
def update_nvidia_model(new_model):
|
658 |
-
|
659 |
name=new_model,
|
660 |
src=nvidia_gradio.registry,
|
661 |
accept_token=True,
|
662 |
fill_height=True
|
663 |
)
|
664 |
-
return nvidia_interface
|
665 |
|
666 |
nvidia_model.change(
|
667 |
fn=update_nvidia_model,
|
|
|
41 |
)
|
42 |
|
43 |
def update_llama_model(new_model):
|
44 |
+
return gr.load(
|
45 |
name=new_model,
|
46 |
src=sambanova_gradio.registry,
|
47 |
multimodal=True,
|
48 |
fill_height=True
|
49 |
)
|
|
|
50 |
|
51 |
llama_model.change(
|
52 |
fn=update_llama_model,
|
|
|
76 |
)
|
77 |
|
78 |
def update_gemini_model(new_model):
|
79 |
+
return gr.load(
|
80 |
name=new_model,
|
81 |
src=gemini_gradio.registry,
|
82 |
fill_height=True
|
83 |
)
|
|
|
84 |
|
85 |
gemini_model.change(
|
86 |
fn=update_gemini_model,
|
|
|
122 |
)
|
123 |
|
124 |
def update_model(new_model):
|
125 |
+
return gr.load(
|
126 |
name=new_model,
|
127 |
src=openai_gradio.registry,
|
128 |
accept_token=True,
|
129 |
fill_height=True
|
130 |
)
|
|
|
131 |
|
132 |
model_choice.change(
|
133 |
fn=update_model,
|
|
|
157 |
)
|
158 |
|
159 |
def update_claude_model(new_model):
|
160 |
+
return gr.load(
|
161 |
name=new_model,
|
162 |
src=anthropic_gradio.registry,
|
163 |
accept_token=True,
|
164 |
fill_height=True
|
165 |
)
|
|
|
166 |
|
167 |
claude_model.change(
|
168 |
fn=update_claude_model,
|
|
|
188 |
)
|
189 |
|
190 |
def update_grok_model(new_model):
|
191 |
+
return gr.load(
|
192 |
name=new_model,
|
193 |
src=xai_gradio.registry,
|
194 |
fill_height=True
|
195 |
)
|
|
|
196 |
|
197 |
grok_model.change(
|
198 |
fn=update_grok_model,
|
|
|
225 |
)
|
226 |
|
227 |
def update_groq_model(new_model):
|
228 |
+
return gr.load(
|
229 |
name=new_model,
|
230 |
src=groq_gradio.registry,
|
231 |
fill_height=True
|
232 |
)
|
|
|
233 |
|
234 |
groq_model.change(
|
235 |
fn=update_groq_model,
|
|
|
271 |
)
|
272 |
|
273 |
def update_hyperbolic_model(new_model):
|
274 |
+
return gr.load(
|
275 |
name=new_model,
|
276 |
src=hyperbolic_gradio.registry,
|
277 |
fill_height=True
|
278 |
)
|
|
|
279 |
|
280 |
hyperbolic_model.change(
|
281 |
fn=update_hyperbolic_model,
|
|
|
309 |
)
|
310 |
|
311 |
def update_qwen_model(new_model):
|
312 |
+
return gr.load(
|
313 |
name=new_model,
|
314 |
src=hyperbolic_gradio.registry,
|
315 |
fill_height=True
|
316 |
)
|
|
|
317 |
|
318 |
qwen_model.change(
|
319 |
fn=update_qwen_model,
|
|
|
356 |
)
|
357 |
|
358 |
def update_perplexity_model(new_model):
|
359 |
+
return gr.load(
|
360 |
name=new_model,
|
361 |
src=perplexity_gradio.registry,
|
362 |
accept_token=True,
|
363 |
fill_height=True
|
364 |
)
|
|
|
365 |
|
366 |
perplexity_model.change(
|
367 |
fn=update_perplexity_model,
|
|
|
420 |
)
|
421 |
|
422 |
def update_mistral_model(new_model):
|
423 |
+
return gr.load(
|
424 |
name=new_model,
|
425 |
src=mistral_gradio.registry,
|
426 |
fill_height=True
|
427 |
)
|
|
|
428 |
|
429 |
mistral_model.change(
|
430 |
fn=update_mistral_model,
|
|
|
460 |
)
|
461 |
|
462 |
def update_fireworks_model(new_model):
|
463 |
+
return gr.load(
|
464 |
name=new_model,
|
465 |
src=fireworks_gradio.registry,
|
466 |
fill_height=True
|
467 |
)
|
|
|
468 |
|
469 |
fireworks_model.change(
|
470 |
fn=update_fireworks_model,
|
|
|
496 |
)
|
497 |
|
498 |
def update_cerebras_model(new_model):
|
499 |
+
return gr.load(
|
500 |
name=new_model,
|
501 |
src=cerebras_gradio.registry,
|
502 |
accept_token=True, # Added token acceptance
|
503 |
fill_height=True
|
504 |
)
|
|
|
505 |
|
506 |
cerebras_model.change(
|
507 |
fn=update_cerebras_model,
|
|
|
566 |
)
|
567 |
|
568 |
def update_together_model(new_model):
|
569 |
+
return gr.load(
|
570 |
name=new_model,
|
571 |
src=together_gradio.registry,
|
572 |
multimodal=True,
|
573 |
fill_height=True
|
574 |
)
|
|
|
575 |
|
576 |
together_model.change(
|
577 |
fn=update_together_model,
|
|
|
642 |
)
|
643 |
|
644 |
def update_nvidia_model(new_model):
|
645 |
+
return gr.load(
|
646 |
name=new_model,
|
647 |
src=nvidia_gradio.registry,
|
648 |
accept_token=True,
|
649 |
fill_height=True
|
650 |
)
|
|
|
651 |
|
652 |
nvidia_model.change(
|
653 |
fn=update_nvidia_model,
|