JeCabrera commited on
Commit
79a0398
·
verified ·
1 Parent(s): 9c7b492

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -8,6 +8,8 @@ import hyperbolic_gradio
8
  import perplexity_gradio
9
  import mistral_gradio
10
  import fireworks_gradio
 
 
11
 
12
 
13
 
@@ -51,8 +53,9 @@ with gr.Blocks(fill_height=True) as demo:
51
  inputs=[llama_model],
52
  outputs=[llama_interface]
53
  )
54
-
55
- gr.Markdown("**Note:** You need to use a SambaNova API key from [SambaNova Cloud](https://cloud.sambanova.ai/).")
 
56
  with gr.Tab("Gemini"):
57
  with gr.Row():
58
  gemini_model = gr.Dropdown(
@@ -69,7 +72,6 @@ with gr.Blocks(fill_height=True) as demo:
69
 
70
  gemini_interface = gr.load(
71
  name=gemini_model.value,
72
- src=gemini_gradio.registry,
73
  fill_height=True,
74
  chatbot=gr.Chatbot(height=600)
75
  )
 
8
  import perplexity_gradio
9
  import mistral_gradio
10
  import fireworks_gradio
11
+ import os
12
+ import genai # Importar la librería de Google Gemini para interactuar con la API
13
 
14
 
15
 
 
53
  inputs=[llama_model],
54
  outputs=[llama_interface]
55
  )
56
+ # Configurar la API de Google Gemini
57
+ genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
58
+ gr.Markdown("**Note:** You need to use a Google Gemini API key from your account.")
59
  with gr.Tab("Gemini"):
60
  with gr.Row():
61
  gemini_model = gr.Dropdown(
 
72
 
73
  gemini_interface = gr.load(
74
  name=gemini_model.value,
 
75
  fill_height=True,
76
  chatbot=gr.Chatbot(height=600)
77
  )