Rearrange UI
Browse files- app.py +10 -8
- videos/tempfile.mp4 +2 -2
app.py
CHANGED
|
@@ -64,19 +64,21 @@ block = gr.Blocks(css=".gradio-container {background-color: lightgray}")
|
|
| 64 |
|
| 65 |
with block:
|
| 66 |
with gr.Row():
|
| 67 |
-
my_file = gr.File(label="Upload a file", type="file", visible=False)
|
| 68 |
-
|
| 69 |
-
tmp_file = gr.File("videos/Masahiro.mp4", visible=False)
|
| 70 |
-
tmp_file_url = "/file=" + tmp_file.value['name']
|
| 71 |
-
htm_video = f'<video width="256" height="256" autoplay muted loop><source src={tmp_file_url} type="video/mp4" poster="Masahiro.png"></video>'
|
| 72 |
-
video_html = gr.HTML(htm_video)
|
| 73 |
-
|
| 74 |
gr.Markdown("<h3><center>Q&A GPT3.5/LangChain</center></h3>")
|
| 75 |
|
| 76 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...)",
|
| 77 |
show_label=False, lines=1, type='password')
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
with gr.Row():
|
| 82 |
message = gr.Textbox(label="What's your question?",
|
|
|
|
| 64 |
|
| 65 |
with block:
|
| 66 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
gr.Markdown("<h3><center>Q&A GPT3.5/LangChain</center></h3>")
|
| 68 |
|
| 69 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...)",
|
| 70 |
show_label=False, lines=1, type='password')
|
| 71 |
|
| 72 |
+
with gr.Row():
|
| 73 |
+
with gr.Column(scale=0.25, min_width=240):
|
| 74 |
+
my_file = gr.File(label="Upload a file", type="file", visible=False)
|
| 75 |
+
tmp_file = gr.File("videos/Masahiro.mp4", visible=False)
|
| 76 |
+
tmp_file_url = "/file=" + tmp_file.value['name']
|
| 77 |
+
htm_video = f'<video width="256" height="256" autoplay muted loop><source src={tmp_file_url} type="video/mp4" poster="Masahiro.png"></video>'
|
| 78 |
+
video_html = gr.HTML(htm_video)
|
| 79 |
+
|
| 80 |
+
with gr.Column(scale=0.75):
|
| 81 |
+
chatbot = gr.Chatbot()
|
| 82 |
|
| 83 |
with gr.Row():
|
| 84 |
message = gr.Textbox(label="What's your question?",
|
videos/tempfile.mp4
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e9a968cdbdf20418a44a5afe453dfdb190482b59e177a5f87b4fc37107b8d43
|
| 3 |
+
size 126937
|