Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,14 @@ def bot(history):
|
|
27 |
|
28 |
|
29 |
with gr.Blocks() as demo:
|
30 |
-
chatbot = gr.Chatbot([], elem_id="chatbot")
|
31 |
|
32 |
with gr.Row():
|
33 |
with gr.Column(scale=0.85):
|
34 |
txt = gr.Textbox(
|
35 |
show_label=False,
|
36 |
placeholder="Enter text and press enter, or upload an image",
|
37 |
-
)
|
38 |
with gr.Column(scale=0.15, min_width=0):
|
39 |
btn = gr.UploadButton("π", file_types=["image"])
|
40 |
|
@@ -45,8 +45,13 @@ with gr.Blocks() as demo:
|
|
45 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
46 |
bot, chatbot, chatbot
|
47 |
)
|
48 |
-
btn.upload(lambda : gr.update(label='β¬οΈπΌοΈ'), [], btn)
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
demo.queue()
|
52 |
demo.launch(debug=True)
|
|
|
27 |
|
28 |
|
29 |
with gr.Blocks() as demo:
|
30 |
+
chatbot = gr.Chatbot([], elem_id="chatbot") #.style(height=750)
|
31 |
|
32 |
with gr.Row():
|
33 |
with gr.Column(scale=0.85):
|
34 |
txt = gr.Textbox(
|
35 |
show_label=False,
|
36 |
placeholder="Enter text and press enter, or upload an image",
|
37 |
+
) #.style(container=False)
|
38 |
with gr.Column(scale=0.15, min_width=0):
|
39 |
btn = gr.UploadButton("π", file_types=["image"])
|
40 |
|
|
|
45 |
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
46 |
bot, chatbot, chatbot
|
47 |
)
|
48 |
+
btn.upload(lambda : gr.update(label='β¬οΈπΌοΈ', interactive=False), [], btn)
|
49 |
+
txt.submit(lambda : gr.update(label="π", interactive=True),[],btn)
|
50 |
+
|
51 |
+
#btn.upload(add_file, [upload_btn], [imagebox, upload_btn], queue=False)
|
52 |
+
#submit_btn.click(lambda : gr.update(label='π Upload image', interactive=True), [], upload_btn)
|
53 |
+
#txt_msg.submit(lambda : gr.update(label='π', interactive=True), [], btn)
|
54 |
+
#clear_btn.click(lambda : gr.update(label='π Upload image', interactive=True), [], upload_btn)
|
55 |
|
56 |
demo.queue()
|
57 |
demo.launch(debug=True)
|