Spaces:
Runtime error
Runtime error
support grok vision
Browse files
app.py
CHANGED
@@ -169,12 +169,35 @@ with gr.Blocks(fill_height=True) as demo:
|
|
169 |
outputs=[claude_interface]
|
170 |
)
|
171 |
with gr.Tab("Grok"):
|
172 |
-
gr.
|
173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
src=xai_gradio.registry,
|
175 |
-
accept_token=True,
|
176 |
fill_height=True
|
177 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
with gr.Tab("Groq"):
|
179 |
with gr.Row():
|
180 |
groq_model = gr.Dropdown(
|
|
|
169 |
outputs=[claude_interface]
|
170 |
)
|
171 |
with gr.Tab("Grok"):
|
172 |
+
with gr.Row():
|
173 |
+
grok_model = gr.Dropdown(
|
174 |
+
choices=[
|
175 |
+
'grok-beta',
|
176 |
+
'grok-vision-beta'
|
177 |
+
],
|
178 |
+
value='grok-beta',
|
179 |
+
label="Select Grok Model",
|
180 |
+
interactive=True
|
181 |
+
)
|
182 |
+
|
183 |
+
grok_interface = gr.load(
|
184 |
+
name=grok_model.value,
|
185 |
src=xai_gradio.registry,
|
|
|
186 |
fill_height=True
|
187 |
)
|
188 |
+
|
189 |
+
def update_grok_model(new_model):
|
190 |
+
return gr.load(
|
191 |
+
name=new_model,
|
192 |
+
src=xai_gradio.registry,
|
193 |
+
fill_height=True
|
194 |
+
)
|
195 |
+
|
196 |
+
grok_model.change(
|
197 |
+
fn=update_grok_model,
|
198 |
+
inputs=[grok_model],
|
199 |
+
outputs=[grok_interface]
|
200 |
+
)
|
201 |
with gr.Tab("Groq"):
|
202 |
with gr.Row():
|
203 |
groq_model = gr.Dropdown(
|