Ryouko commited on
Commit
92cd013
·
verified ·
1 Parent(s): 8dcba91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -18
app.py CHANGED
@@ -112,24 +112,22 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
112
  """)
113
 
114
  with gr.Row():
115
- with gr.Column(scale=2):
116
- chatbot = gr.ChatInterface(
117
- fn=bot_streaming,
118
- additional_inputs=[
119
- api_key, model, system_prompt, temperature, max_tokens, top_p, top_k,
120
- harassment, hate_speech, sexually_explicit, dangerous_content
121
- ],
122
- title="💬 Chat with Google Gemini AI",
123
- description="Upload images or type your message to start the conversation.",
124
- retry_btn="🔄 Retry",
125
- undo_btn="Undo",
126
- clear_btn="🗑️ Clear",
127
- multimodal=True,
128
- cache_examples=False,
129
- fill_height=True,
130
- )
131
- with gr.Column(scale=1):
132
- api_key = gr.Textbox(label="API Key", type="password", placeholder="Enter your Google AI API key")
133
  model = gr.Dropdown(
134
  label="Select Model",
135
  choices=[
@@ -148,6 +146,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
148
  )
149
  system_prompt = gr.Textbox(label="System Prompt", placeholder="Enter a system prompt (optional)")
150
 
 
151
  with gr.Accordion("Common Settings", open=False):
152
  temperature = gr.Slider(minimum=0, maximum=1, value=0.7, step=0.1, label="Temperature")
153
  max_tokens = gr.Slider(minimum=1, maximum=2048, value=1000, step=1, label="Max Tokens")
 
112
  """)
113
 
114
  with gr.Row():
115
+ chatbot = gr.ChatInterface(
116
+ fn=bot_streaming,
117
+ additional_inputs=[
118
+ api_key, model, system_prompt, temperature, max_tokens, top_p, top_k,
119
+ harassment, hate_speech, sexually_explicit, dangerous_content
120
+ ],
121
+ title="💬 Chat with Google Gemini AI",
122
+ description="Upload images or type your message to start the conversation.",
123
+ retry_btn="🔄 Retry",
124
+ undo_btn="↩️ Undo",
125
+ clear_btn="🗑Clear",
126
+ multimodal=True,
127
+ cache_examples=False,
128
+ fill_height=True,
129
+ )
130
+ api_key = gr.Textbox(label="API Key", type="password", placeholder="Enter your Google AI API key")
 
 
131
  model = gr.Dropdown(
132
  label="Select Model",
133
  choices=[
 
146
  )
147
  system_prompt = gr.Textbox(label="System Prompt", placeholder="Enter a system prompt (optional)")
148
 
149
+ with gr.Column(scale=1):
150
  with gr.Accordion("Common Settings", open=False):
151
  temperature = gr.Slider(minimum=0, maximum=1, value=0.7, step=0.1, label="Temperature")
152
  max_tokens = gr.Slider(minimum=1, maximum=2048, value=1000, step=1, label="Max Tokens")