add groq
Browse files- app.py +39 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -9,6 +9,7 @@ import perplexity_gradio
|
|
| 9 |
import mistral_gradio
|
| 10 |
import fireworks_gradio
|
| 11 |
import cerebras_gradio
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
|
|
@@ -173,6 +174,44 @@ with gr.Blocks(fill_height=True) as demo:
|
|
| 173 |
accept_token=True,
|
| 174 |
fill_height=True
|
| 175 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
with gr.Tab("Qwen"):
|
| 177 |
with gr.Row():
|
| 178 |
qwen_model = gr.Dropdown(
|
|
|
|
| 9 |
import mistral_gradio
|
| 10 |
import fireworks_gradio
|
| 11 |
import cerebras_gradio
|
| 12 |
+
import groq_gradio
|
| 13 |
|
| 14 |
|
| 15 |
|
|
|
|
| 174 |
accept_token=True,
|
| 175 |
fill_height=True
|
| 176 |
)
|
| 177 |
+
with gr.Tab("Groq"):
|
| 178 |
+
with gr.Row():
|
| 179 |
+
groq_model = gr.Dropdown(
|
| 180 |
+
choices=[
|
| 181 |
+
'llama-3.2-3b-preview',
|
| 182 |
+
'llama-3.2-11b-preview',
|
| 183 |
+
'llama-3.2-90b-preview',
|
| 184 |
+
'mixtral-8x7b-preview'
|
| 185 |
+
],
|
| 186 |
+
value='llama-3.2-90b-preview', # Default to largest model
|
| 187 |
+
label="Select Groq Model",
|
| 188 |
+
interactive=True
|
| 189 |
+
)
|
| 190 |
+
|
| 191 |
+
groq_interface = gr.load(
|
| 192 |
+
name=groq_model.value,
|
| 193 |
+
src=groq_gradio.registry,
|
| 194 |
+
accept_token=True,
|
| 195 |
+
fill_height=True
|
| 196 |
+
)
|
| 197 |
+
|
| 198 |
+
def update_groq_model(new_model):
|
| 199 |
+
return gr.load(
|
| 200 |
+
name=new_model,
|
| 201 |
+
src=groq_gradio.registry,
|
| 202 |
+
accept_token=True,
|
| 203 |
+
fill_height=True
|
| 204 |
+
)
|
| 205 |
+
|
| 206 |
+
groq_model.change(
|
| 207 |
+
fn=update_groq_model,
|
| 208 |
+
inputs=[groq_model],
|
| 209 |
+
outputs=[groq_interface]
|
| 210 |
+
)
|
| 211 |
+
|
| 212 |
+
gr.Markdown("""
|
| 213 |
+
**Note:** You need a Groq API key to use these models. Get one at [Groq Cloud](https://console.groq.com/).
|
| 214 |
+
""")
|
| 215 |
with gr.Tab("Qwen"):
|
| 216 |
with gr.Row():
|
| 217 |
qwen_model = gr.Dropdown(
|
requirements.txt
CHANGED
|
@@ -8,3 +8,4 @@ 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
|
|
|
|
|
|
| 8 |
mistral-gradio
|
| 9 |
git+https://github.com/AK391/fireworks-ai-gradio.git
|
| 10 |
git+https://github.com/gradio-app/cerebras_gradio.git
|
| 11 |
+
groq-gradio
|