Spaces:
Runtime error
Runtime error
add llama models for sambanova
Browse files
app.py
CHANGED
@@ -118,14 +118,45 @@ with gr.Blocks(fill_height=True) as demo:
|
|
118 |
inputs=[claude_model],
|
119 |
outputs=[claude_interface]
|
120 |
)
|
121 |
-
with gr.Tab("Meta Llama
|
122 |
-
gr.
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
src=sambanova_gradio.registry,
|
125 |
accept_token=True,
|
126 |
-
multimodal=True
|
127 |
-
description="Requires SambaNova API key"
|
128 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
with gr.Tab("Grok"):
|
130 |
gr.load(
|
131 |
name='grok-beta',
|
|
|
118 |
inputs=[claude_model],
|
119 |
outputs=[claude_interface]
|
120 |
)
|
121 |
+
with gr.Tab("Meta Llama"):
|
122 |
+
with gr.Row():
|
123 |
+
llama_model = gr.Dropdown(
|
124 |
+
choices=[
|
125 |
+
'Meta-Llama-3.2-1B-Instruct', # Llama 3.2 1B
|
126 |
+
'Meta-Llama-3.2-3B-Instruct', # Llama 3.2 3B
|
127 |
+
'Llama-3.2-11B-Vision-Instruct', # Llama 3.2 11B
|
128 |
+
'Llama-3.2-90B-Vision-Instruct', # Llama 3.2 90B
|
129 |
+
'Meta-Llama-3.1-8B-Instruct', # Llama 3.1 8B
|
130 |
+
'Meta-Llama-3.1-70B-Instruct', # Llama 3.1 70B
|
131 |
+
'Meta-Llama-3.1-405B-Instruct' # Llama 3.1 405B
|
132 |
+
],
|
133 |
+
value='Llama-3.2-90B-Vision-Instruct', # Default to the most advanced model
|
134 |
+
label="Select Llama Model",
|
135 |
+
interactive=True
|
136 |
+
)
|
137 |
+
|
138 |
+
llama_interface = gr.load(
|
139 |
+
name=llama_model.value,
|
140 |
src=sambanova_gradio.registry,
|
141 |
accept_token=True,
|
142 |
+
multimodal=True
|
|
|
143 |
)
|
144 |
+
|
145 |
+
def update_llama_model(new_model):
|
146 |
+
return gr.load(
|
147 |
+
name=new_model,
|
148 |
+
src=sambanova_gradio.registry,
|
149 |
+
accept_token=True,
|
150 |
+
multimodal=True
|
151 |
+
)
|
152 |
+
|
153 |
+
llama_model.change(
|
154 |
+
fn=update_llama_model,
|
155 |
+
inputs=[llama_model],
|
156 |
+
outputs=[llama_interface]
|
157 |
+
)
|
158 |
+
|
159 |
+
gr.Markdown("**Note:** You need to use a SambaNova API key from [SambaNova Cloud](https://cloud.sambanova.ai/).")
|
160 |
with gr.Tab("Grok"):
|
161 |
gr.load(
|
162 |
name='grok-beta',
|