Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
|
2 |
+
gr.Markdown("<h3><center>Visual ChatGPT</center></h3>")
|
3 |
+
gr.Markdown(
|
4 |
+
"""This is a demo to the work [Visual ChatGPT: Talking, Drawing and Editing with Visual Foundation Models](https://github.com/microsoft/visual-chatgpt).<br>
|
5 |
+
This space connects ChatGPT and a series of Visual Foundation Models to enable sending and receiving images during chatting.<br>
|
6 |
+
"""
|
7 |
+
)
|
8 |
+
|
9 |
+
|
10 |
+
chatbot = gr.Chatbot(elem_id="chatbot", label="Visual ChatGPT")
|
11 |
+
state = gr.State([])
|
12 |
+
|
13 |
+
with gr.Row(visible=False) as input_raws:
|
14 |
+
with gr.Column(scale=0.7):
|
15 |
+
txt = gr.Textbox(show_label=False, placeholder="Enter text and press enter, or upload an image").style(container=False)
|
16 |
+
with gr.Column(scale=0.10, min_width=0):
|
17 |
+
run = gr.Button("🏃♂️Run")
|
18 |
+
with gr.Column(scale=0.10, min_width=0):
|
19 |
+
clear = gr.Button("🔄Clear️")
|
20 |
+
|
21 |
+
|
22 |
+
demo.queue(concurrency_count=10).launch(server_name="0.0.0.0", server_port=7860)
|