add fireworks
Browse files- app.py +35 -0
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -7,6 +7,7 @@ import xai_gradio
|
|
| 7 |
import hyperbolic_gradio
|
| 8 |
import perplexity_gradio
|
| 9 |
import mistral_gradio
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
|
|
@@ -297,6 +298,40 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 297 |
|
| 298 |
Each model has different context window sizes (from 8k to 256k tokens) and specialized capabilities.
|
| 299 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
|
| 301 |
demo.launch(ssr_mode=False)
|
| 302 |
|
|
|
|
| 7 |
import hyperbolic_gradio
|
| 8 |
import perplexity_gradio
|
| 9 |
import mistral_gradio
|
| 10 |
+
import fireworks_gradio
|
| 11 |
|
| 12 |
|
| 13 |
|
|
|
|
| 298 |
|
| 299 |
Each model has different context window sizes (from 8k to 256k tokens) and specialized capabilities.
|
| 300 |
""")
|
| 301 |
+
with gr.Tab("Fireworks"):
|
| 302 |
+
with gr.Row():
|
| 303 |
+
fireworks_model = gr.Dropdown(
|
| 304 |
+
choices=[
|
| 305 |
+
'f1-preview', # Latest F1 preview model
|
| 306 |
+
'f1-mini-preview', # Smaller, faster model
|
| 307 |
+
],
|
| 308 |
+
value='f1-preview', # Default to preview model
|
| 309 |
+
label="Select Fireworks Model",
|
| 310 |
+
interactive=True
|
| 311 |
+
)
|
| 312 |
+
|
| 313 |
+
fireworks_interface = gr.load(
|
| 314 |
+
name=fireworks_model.value,
|
| 315 |
+
src=fireworks_gradio.registry,
|
| 316 |
+
fill_height=True
|
| 317 |
+
)
|
| 318 |
+
|
| 319 |
+
def update_fireworks_model(new_model):
|
| 320 |
+
return gr.load(
|
| 321 |
+
name=new_model,
|
| 322 |
+
src=fireworks_gradio.registry,
|
| 323 |
+
fill_height=True
|
| 324 |
+
)
|
| 325 |
+
|
| 326 |
+
fireworks_model.change(
|
| 327 |
+
fn=update_fireworks_model,
|
| 328 |
+
inputs=[fireworks_model],
|
| 329 |
+
outputs=[fireworks_interface]
|
| 330 |
+
)
|
| 331 |
+
|
| 332 |
+
gr.Markdown("""
|
| 333 |
+
**Note:** You need a Fireworks AI API key to use these models. Get one at [Fireworks AI](https://app.fireworks.ai/).
|
| 334 |
+
""")
|
| 335 |
|
| 336 |
demo.launch(ssr_mode=False)
|
| 337 |
|
requirements.txt
CHANGED
|
@@ -5,4 +5,5 @@ sambanova-gradio
|
|
| 5 |
xai-gradio
|
| 6 |
hyperbolic-gradio
|
| 7 |
perplexity-gradio
|
| 8 |
-
mistral-gradio
|
|
|
|
|
|
| 5 |
xai-gradio
|
| 6 |
hyperbolic-gradio
|
| 7 |
perplexity-gradio
|
| 8 |
+
mistral-gradio
|
| 9 |
+
git+https://github.com/AK391/fireworks-ai-gradio.git
|