Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -204,7 +204,36 @@ demo = gr.ChatInterface( | |
| 204 | 
             
            print("ChatInterface object created.")
         | 
| 205 |  | 
| 206 | 
             
            with demo:
         | 
| 207 | 
            -
                 | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 208 | 
             
                    model_search_box = gr.Textbox(
         | 
| 209 | 
             
                        label="Filter Models",
         | 
| 210 | 
             
                        placeholder="Search for a featured model...",
         | 
| @@ -271,34 +300,6 @@ with demo: | |
| 271 | 
             
                        outputs=custom_model_box
         | 
| 272 | 
             
                    )
         | 
| 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.")
         | 
| 304 |  | 
|  | |
| 204 | 
             
            print("ChatInterface object created.")
         | 
| 205 |  | 
| 206 | 
             
            with demo:
         | 
| 207 | 
            +
                # Add new accordion for advanced settings including provider selection
         | 
| 208 | 
            +
                with gr.Accordion("Advanced Settings", open=True):
         | 
| 209 | 
            +
                    gr.Markdown("### Inference Provider Selection")
         | 
| 210 | 
            +
                    gr.Markdown("Select which provider to use for inference. Uses your Hugging Face PRO credits.")
         | 
| 211 | 
            +
                    # Provider dropdown is already included in the additional_inputs
         | 
| 212 | 
            +
                    
         | 
| 213 | 
            +
                    gr.Markdown("""
         | 
| 214 | 
            +
                    ### Provider Information
         | 
| 215 | 
            +
                    
         | 
| 216 | 
            +
                    - **hf-inference**: Default Hugging Face Inference API
         | 
| 217 | 
            +
                    - **cerebras**: Cerebras AI models - extremely fast inference (70x faster than GPUs)
         | 
| 218 | 
            +
                    - **together**: Together AI models
         | 
| 219 | 
            +
                    - **sambanova**: SambaNova models
         | 
| 220 | 
            +
                    - **replicate**: Replicate models
         | 
| 221 | 
            +
                    - **fal-ai**: Fal.ai models
         | 
| 222 | 
            +
                    - **novita**: Novita AI
         | 
| 223 | 
            +
                    - **black-forest-labs**: Black Forest Labs
         | 
| 224 | 
            +
                    - **cohere**: Cohere models
         | 
| 225 | 
            +
                    - **fireworks-ai**: Fireworks AI
         | 
| 226 | 
            +
                    - **hyperbolic**: Hyperbolic models
         | 
| 227 | 
            +
                    - **nebius**: Nebius models
         | 
| 228 | 
            +
                    - **openai**: OpenAI compatible endpoints
         | 
| 229 | 
            +
                    
         | 
| 230 | 
            +
                    As a PRO user, you receive $2 of credits monthly across all providers.
         | 
| 231 | 
            +
                    
         | 
| 232 | 
            +
                    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.
         | 
| 233 | 
            +
                    """)
         | 
| 234 | 
            +
                    
         | 
| 235 | 
            +
                    # Model selection components moved from the removed accordion
         | 
| 236 | 
            +
                    gr.Markdown("### Model Selection")
         | 
| 237 | 
             
                    model_search_box = gr.Textbox(
         | 
| 238 | 
             
                        label="Filter Models",
         | 
| 239 | 
             
                        placeholder="Search for a featured model...",
         | 
|  | |
| 300 | 
             
                        outputs=custom_model_box
         | 
| 301 | 
             
                    )
         | 
| 302 | 
             
                    print("Featured model radio button change event linked.")
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 303 |  | 
| 304 | 
             
            print("Gradio interface initialized.")
         | 
| 305 |  | 
