add cerebras
Browse files- app.py +28 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import hyperbolic_gradio
|
|
| 8 |
import perplexity_gradio
|
| 9 |
import mistral_gradio
|
| 10 |
import fireworks_gradio
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
|
|
@@ -357,6 +358,33 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 357 |
gr.Markdown("""
|
| 358 |
**Note:** You need a Fireworks AI API key to use these models. Get one at [Fireworks AI](https://app.fireworks.ai/).
|
| 359 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 360 |
|
| 361 |
demo.launch(ssr_mode=False)
|
| 362 |
|
|
|
|
| 8 |
import perplexity_gradio
|
| 9 |
import mistral_gradio
|
| 10 |
import fireworks_gradio
|
| 11 |
+
import cerebras_gradio
|
| 12 |
|
| 13 |
|
| 14 |
|
|
|
|
| 358 |
gr.Markdown("""
|
| 359 |
**Note:** You need a Fireworks AI API key to use these models. Get one at [Fireworks AI](https://app.fireworks.ai/).
|
| 360 |
""")
|
| 361 |
+
with gr.Tab("Cerebras"):
|
| 362 |
+
with gr.Row():
|
| 363 |
+
cerebras_model = gr.Dropdown(
|
| 364 |
+
choices=[
|
| 365 |
+
'llama3.1-8b',
|
| 366 |
+
'llama3.1-70b',
|
| 367 |
+
'llama3.1-405b'
|
| 368 |
+
],
|
| 369 |
+
value='llama3.1-70b', # Default to mid-size model
|
| 370 |
+
label="Select Cerebras Model",
|
| 371 |
+
interactive=True
|
| 372 |
+
)
|
| 373 |
+
|
| 374 |
+
cerebras_interface = gr.load(
|
| 375 |
+
name=cerebras_model.value,
|
| 376 |
+
src=cerebras_gradio.registry,
|
| 377 |
+
accept_token=True, # Added token acceptance
|
| 378 |
+
fill_height=True
|
| 379 |
+
)
|
| 380 |
+
|
| 381 |
+
def update_cerebras_model(new_model):
|
| 382 |
+
return gr.load(
|
| 383 |
+
name=new_model,
|
| 384 |
+
src=cerebras_gradio.registry,
|
| 385 |
+
accept_token=True, # Added token acceptance
|
| 386 |
+
fill_height=True
|
| 387 |
+
)
|
| 388 |
|
| 389 |
demo.launch(ssr_mode=False)
|
| 390 |
|
requirements.txt
CHANGED
|
@@ -7,3 +7,4 @@ hyperbolic-gradio
|
|
| 7 |
perplexity-gradio
|
| 8 |
mistral-gradio
|
| 9 |
git+https://github.com/AK391/fireworks-ai-gradio.git
|
|
|
|
|
|
| 7 |
perplexity-gradio
|
| 8 |
mistral-gradio
|
| 9 |
git+https://github.com/AK391/fireworks-ai-gradio.git
|
| 10 |
+
git+https://github.com/gradio-app/cerebras_gradio.git
|