eaglelandsonce commited on
Commit
e80434f
1 Parent(s): 04e6cb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +55 -42
app.py CHANGED
@@ -230,48 +230,61 @@ bot_inputs = [
230
  chatbot_component
231
  ]
232
 
 
 
 
 
 
 
 
 
 
233
  with gr.Blocks() as demo:
234
- gr.HTML(TITLE)
235
- gr.HTML(SUBTITLE)
236
- gr.HTML(GETKEY)
237
- with gr.Column():
238
- google_key_component.render()
239
- chatbot_component.render()
240
- with gr.Row():
241
- text_prompt_component.render()
242
- upload_button_component.render()
243
- run_button_component.render()
244
- with gr.Accordion("Parameters", open=False):
245
- temperature_component.render()
246
- max_output_tokens_component.render()
247
- stop_sequences_component.render()
248
- with gr.Accordion("Advanced", open=False):
249
- top_k_component.render()
250
- top_p_component.render()
251
-
252
- run_button_component.click(
253
- fn=user,
254
- inputs=user_inputs,
255
- outputs=[text_prompt_component, chatbot_component],
256
- queue=False
257
- ).then(
258
- fn=bot, inputs=bot_inputs, outputs=[chatbot_component],
259
- )
260
-
261
- text_prompt_component.submit(
262
- fn=user,
263
- inputs=user_inputs,
264
- outputs=[text_prompt_component, chatbot_component],
265
- queue=False
266
- ).then(
267
- fn=bot, inputs=bot_inputs, outputs=[chatbot_component],
268
- )
269
-
270
- upload_button_component.upload(
271
- fn=upload,
272
- inputs=[upload_button_component, chatbot_component],
273
- outputs=[chatbot_component],
274
- queue=False
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)