Nymbo commited on
Commit
ba79a28
·
verified ·
1 Parent(s): ba0614b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -8
app.py CHANGED
@@ -159,11 +159,18 @@ providers_list = [
159
  "together", # Together AI
160
  "sambanova", # SambaNova
161
  "replicate", # Replicate
162
- "fal-ai" # Fal.ai
 
 
 
 
 
 
 
163
  ]
164
 
165
- # Provider selection radio
166
- provider_radio = gr.Radio(
167
  choices=providers_list,
168
  value="hf-inference",
169
  label="Inference Provider",
@@ -188,7 +195,7 @@ demo = gr.ChatInterface(
188
  frequency_penalty_slider,
189
  seed_slider,
190
  custom_model_box,
191
- provider_radio, # Add provider selection to inputs
192
  ],
193
  fill_height=True,
194
  chatbot=chatbot,
@@ -266,22 +273,31 @@ with demo:
266
  print("Featured model radio button change event linked.")
267
 
268
  # Add new accordion for advanced settings including provider selection
269
- with gr.Accordion("Advanced Settings", open=False):
270
- gr.Markdown("### Inference Provider")
271
  gr.Markdown("Select which provider to use for inference. Uses your Hugging Face PRO credits.")
272
- # Provider radio is already included in the additional_inputs
273
 
274
  gr.Markdown("""
275
  ### Provider Information
276
 
277
  - **hf-inference**: Default Hugging Face Inference API
278
- - **cerebras**: Cerebras AI models via Hugging Face router
279
  - **together**: Together AI models
280
  - **sambanova**: SambaNova models
281
  - **replicate**: Replicate models
282
  - **fal-ai**: Fal.ai models
 
 
 
 
 
 
 
283
 
284
  As a PRO user, you receive $2 of credits monthly across all providers.
 
 
285
  """)
286
 
287
  print("Gradio interface initialized.")
 
159
  "together", # Together AI
160
  "sambanova", # SambaNova
161
  "replicate", # Replicate
162
+ "fal-ai", # Fal.ai
163
+ "novita", # Novita AI
164
+ "black-forest-labs", # Black Forest Labs
165
+ "cohere", # Cohere
166
+ "fireworks-ai", # Fireworks AI
167
+ "hyperbolic", # Hyperbolic
168
+ "nebius", # Nebius
169
+ "openai" # OpenAI compatible endpoints
170
  ]
171
 
172
+ # Provider selection dropdown for better UX with many options
173
+ provider_dropdown = gr.Dropdown(
174
  choices=providers_list,
175
  value="hf-inference",
176
  label="Inference Provider",
 
195
  frequency_penalty_slider,
196
  seed_slider,
197
  custom_model_box,
198
+ provider_dropdown, # Add provider selection to inputs
199
  ],
200
  fill_height=True,
201
  chatbot=chatbot,
 
273
  print("Featured model radio button change event linked.")
274
 
275
  # Add new accordion for advanced settings including provider selection
276
+ with gr.Accordion("Advanced Settings", open=True):
277
+ gr.Markdown("### Inference Provider Selection")
278
  gr.Markdown("Select which provider to use for inference. Uses your Hugging Face PRO credits.")
279
+ # Provider dropdown is already included in the additional_inputs
280
 
281
  gr.Markdown("""
282
  ### Provider Information
283
 
284
  - **hf-inference**: Default Hugging Face Inference API
285
+ - **cerebras**: Cerebras AI models - extremely fast inference (70x faster than GPUs)
286
  - **together**: Together AI models
287
  - **sambanova**: SambaNova models
288
  - **replicate**: Replicate models
289
  - **fal-ai**: Fal.ai models
290
+ - **novita**: Novita AI
291
+ - **black-forest-labs**: Black Forest Labs
292
+ - **cohere**: Cohere models
293
+ - **fireworks-ai**: Fireworks AI
294
+ - **hyperbolic**: Hyperbolic models
295
+ - **nebius**: Nebius models
296
+ - **openai**: OpenAI compatible endpoints
297
 
298
  As a PRO user, you receive $2 of credits monthly across all providers.
299
+
300
+ Note: Not all models are available on all providers. If you select a provider that doesn't support your chosen model, you'll get an error message.
301
  """)
302
 
303
  print("Gradio interface initialized.")