lixin4ever CircleRadon commited on
Commit
bbed053
·
verified ·
1 Parent(s): 8f231af

Update app.py (#6)

Browse files

- Update app.py (f68cc5fcc4fdfbc50260548b4cbd049901f20d4b)


Co-authored-by: YuqianYuan <[email protected]>

Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -135,9 +135,9 @@ def _predict(messages, input_text, do_sample, temperature, top_p, max_new_tokens
135
 
136
 
137
  with gr.Blocks() as interface:
138
- gr.Markdown(HEADER)
139
  with gr.Row():
140
- chatbot = gr.Chatbot(type="messages", elem_id="chatbot", height=780)
141
 
142
  with gr.Column():
143
  with gr.Tab(label="Input"):
@@ -145,16 +145,17 @@ with gr.Blocks() as interface:
145
  with gr.Row():
146
  input_video = gr.Video(sources=["upload"], label="Upload Video")
147
  input_image = gr.Image(sources=["upload"], type="filepath", label="Upload Image")
 
148
  input_text = gr.Textbox(label="Input Text", placeholder="Type your message here and press enter to submit")
149
 
 
 
150
  gr.Examples(examples=[
151
  [f"examples/bear.mp4", "What is unusual in the video?"],
152
  [f"examples/dog.mp4", "Please describe the video in detail."],
153
  [f"examples/running.mp4", "Who won the competition?"],
154
  ], inputs=[input_video, input_text], label="Video examples")
155
 
156
- submit_button = gr.Button("Generate")
157
-
158
  with gr.Tab(label="Configure"):
159
  with gr.Accordion("Generation Config", open=True):
160
  do_sample = gr.Checkbox(value=True, label="Do Sample")
 
135
 
136
 
137
  with gr.Blocks() as interface:
138
+ gr.HTML(HEADER)
139
  with gr.Row():
140
+ chatbot = gr.Chatbot(type="messages", elem_id="chatbot", height=835)
141
 
142
  with gr.Column():
143
  with gr.Tab(label="Input"):
 
145
  with gr.Row():
146
  input_video = gr.Video(sources=["upload"], label="Upload Video")
147
  input_image = gr.Image(sources=["upload"], type="filepath", label="Upload Image")
148
+
149
  input_text = gr.Textbox(label="Input Text", placeholder="Type your message here and press enter to submit")
150
 
151
+ submit_button = gr.Button("Generate")
152
+
153
  gr.Examples(examples=[
154
  [f"examples/bear.mp4", "What is unusual in the video?"],
155
  [f"examples/dog.mp4", "Please describe the video in detail."],
156
  [f"examples/running.mp4", "Who won the competition?"],
157
  ], inputs=[input_video, input_text], label="Video examples")
158
 
 
 
159
  with gr.Tab(label="Configure"):
160
  with gr.Accordion("Generation Config", open=True):
161
  do_sample = gr.Checkbox(value=True, label="Do Sample")