Spaces:
Sleeping
Sleeping
eaglelandsonce
commited on
Commit
•
e80434f
1
Parent(s):
04e6cb7
Update app.py
Browse files
app.py
CHANGED
@@ -230,48 +230,61 @@ bot_inputs = [
|
|
230 |
chatbot_component
|
231 |
]
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
with gr.Blocks() as demo:
|
234 |
-
gr.
|
235 |
-
|
236 |
-
|
237 |
-
with gr.
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
with gr.Accordion("
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
|
|
|
|
|
|
|
|
276 |
|
277 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|
|
|
230 |
chatbot_component
|
231 |
]
|
232 |
|
233 |
+
|
234 |
+
with gr.Blocks() as demo:
|
235 |
+
with gr.Tab("Lion"):
|
236 |
+
gr.Image("lion.jpg")
|
237 |
+
gr.Button("New Lion")
|
238 |
+
with gr.Tab("Tiger"):
|
239 |
+
gr.Image("tiger.jpg")
|
240 |
+
gr.Button("New Tiger")
|
241 |
+
|
242 |
with gr.Blocks() as demo:
|
243 |
+
with gr.Tab("Movie Script Writer"):
|
244 |
+
gr.Image("lion.jpg")
|
245 |
+
gr.Button("New Lion")
|
246 |
+
with gr.Tab("Gemini Frame Finder"):
|
247 |
+
gr.HTML(TITLE)
|
248 |
+
gr.HTML(SUBTITLE)
|
249 |
+
gr.HTML(GETKEY)
|
250 |
+
with gr.Column():
|
251 |
+
google_key_component.render()
|
252 |
+
chatbot_component.render()
|
253 |
+
with gr.Row():
|
254 |
+
text_prompt_component.render()
|
255 |
+
upload_button_component.render()
|
256 |
+
run_button_component.render()
|
257 |
+
with gr.Accordion("Parameters", open=False):
|
258 |
+
temperature_component.render()
|
259 |
+
max_output_tokens_component.render()
|
260 |
+
stop_sequences_component.render()
|
261 |
+
with gr.Accordion("Advanced", open=False):
|
262 |
+
top_k_component.render()
|
263 |
+
top_p_component.render()
|
264 |
+
|
265 |
+
run_button_component.click(
|
266 |
+
fn=user,
|
267 |
+
inputs=user_inputs,
|
268 |
+
outputs=[text_prompt_component, chatbot_component],
|
269 |
+
queue=False
|
270 |
+
).then(
|
271 |
+
fn=bot, inputs=bot_inputs, outputs=[chatbot_component],
|
272 |
+
)
|
273 |
+
|
274 |
+
text_prompt_component.submit(
|
275 |
+
fn=user,
|
276 |
+
inputs=user_inputs,
|
277 |
+
outputs=[text_prompt_component, chatbot_component],
|
278 |
+
queue=False
|
279 |
+
).then(
|
280 |
+
fn=bot, inputs=bot_inputs, outputs=[chatbot_component],
|
281 |
+
)
|
282 |
+
|
283 |
+
upload_button_component.upload(
|
284 |
+
fn=upload,
|
285 |
+
inputs=[upload_button_component, chatbot_component],
|
286 |
+
outputs=[chatbot_component],
|
287 |
+
queue=False
|
288 |
+
)
|
289 |
|
290 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|