ysharma HF Staff commited on
Commit
12b6679
Β·
1 Parent(s): 085df0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
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").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,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
- txt_msg = txt.submit(lambda : gr.update(label="πŸ“", interactive=True),[],btn)
 
 
 
 
 
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)