updates for gemini
Browse filesFiles changed (5)
- app.py+3-1
- app_gemini.py+19-16
- app_gemini_coder.pyAdded+28
- app_gemini_voice.py+19-9
- requirements.txt+1-1
26 unmodified lines27282930313233343536373825 unmodified lines646566656768697026 unmodified linesfrom app_compare import demo as demo_comparefrom app_hyperbolic import demo as demo_hyperbolicfrom app_openai import demo as demo_openaifrom app_gemini_coder import demo as demo_gemini_coderfrom utils import get_app
# Create mapping of providers to their demosPROVIDERS = { "Gemini Coder": demo_gemini_coder, "DeepSeek": demo_deepseek, "OpenAI": demo_openai, "Compare": demo_compare,25 unmodified lines "NVIDIA": demo_nvidia,}
demo = get_app(models=list(PROVIDERS.keys()), default_model="DeepSeek", src=PROVIDERS, dropdown_label="Select Provider")demo = get_app(models=list(PROVIDERS.keys()), default_model="Gemini Coder", src=PROVIDERS, dropdown_label="Select Provider")
if __name__ == "__main__": demo.queue(api_open=False).launch(show_api=False)1123345678951011121314151617891011121314151617181920181920212223242526import osimport ai_gradiofrom utils_ai_gradio import get_app
import gemini_gradio# Get the Gemini models but keep their full names for loadingGEMINI_MODELS_FULL = [ k for k in ai_gradio.registry.keys() if k.startswith('gemini:')]
from utils import get_app# Create display names without the prefixGEMINI_MODELS_DISPLAY = [ k.replace('gemini:', '') for k in GEMINI_MODELS_FULL]
# Create and launch the interface using get_app utilitydemo = get_app( models=[ "gemini-1.5-flash", "gemini-1.5-flash-8b", "gemini-1.5-pro", "gemini-exp-1114", "gemini-exp-1121", "gemini-exp-1206", "gemini-2.0-flash-exp", "gemini-2.0-flash-thinking-exp-1219", ], default_model="gemini-2.0-flash-thinking-exp-1219", src=gemini_gradio.registry, accept_token=not os.getenv("GEMINI_API_KEY"), models=GEMINI_MODELS_FULL, # Use the full names with prefix default_model=GEMINI_MODELS_FULL[-1], dropdown_label="Select Gemini Model", choices=GEMINI_MODELS_DISPLAY, # Display names without prefix src=ai_gradio.registry, fill_height=True,)
if __name__ == "__main__":12345678910111213141516171819202122232425262728import ai_gradiofrom utils_ai_gradio import get_app
# Get the Gemini models but keep their full names for loadingGEMINI_MODELS_FULL = [ k for k in ai_gradio.registry.keys() if k.startswith('gemini:')]
# Create display names without the prefixGEMINI_MODELS_DISPLAY = [ k.replace('gemini:', '') for k in GEMINI_MODELS_FULL]
# Create and launch the interface using get_app utilitydemo = get_app( models=GEMINI_MODELS_FULL, # Use the full names with prefix default_model=GEMINI_MODELS_FULL[-1], dropdown_label="Select Gemini Model", choices=GEMINI_MODELS_DISPLAY, # Display names without prefix src=ai_gradio.registry, fill_height=True, coder=True,)
if __name__ == "__main__": demo.launch()1123345678951011121314151617891011121318192021222324252627import osimport ai_gradiofrom utils_ai_gradio import get_app
import gemini_gradio# Get the Gemini models but keep their full names for loadingGEMINI_MODELS_FULL = [ k for k in ai_gradio.registry.keys() if k.startswith('gemini:')]
from utils import get_app# Create display names without the prefixGEMINI_MODELS_DISPLAY = [ k.replace('gemini:', '') for k in GEMINI_MODELS_FULL]
# Create and launch the interface using get_app utilitydemo = get_app( models=[ "gemini-2.0-flash-exp", ], default_model="gemini-2.0-flash-exp", src=gemini_gradio.registry, accept_token=not os.getenv("GEMINI_API_KEY"), models=GEMINI_MODELS_FULL, # Use the full names with prefix default_model=GEMINI_MODELS_FULL[-2], dropdown_label="Select Gemini Model", choices=GEMINI_MODELS_DISPLAY, # Display names without prefix src=ai_gradio.registry, enable_voice=True, fill_height=True,)
if __name__ == "__main__":512 unmodified lines513514515516516517518519512 unmodified lines # via anychat (pyproject.toml)yarl==1.18.3 # via aiohttpai-gradio[deepseek,crewai,hyperbolic,openai]==0.1.8ai-gradio[deepseek,crewai,hyperbolic,openai,gemini]==0.1.9crewai==0.86.0instructor==1.3.3crewai-tools>=0.17.0app.py+3-1
app_gemini.py+19-16
app_gemini_coder.pyAdded+28
app_gemini_voice.py+19-9
requirements.txt+1-1