Spaces:
Runtime error
Runtime error
a
#1
by
ysharma
HF staff
- opened
app.py
CHANGED
@@ -63,7 +63,7 @@ a {text-decoration-line: underline; font-weight: 600;}
|
|
63 |
font-size: 16px;
|
64 |
}
|
65 |
#chatbot-component {
|
66 |
-
height:
|
67 |
overflow-y: scroll;
|
68 |
}
|
69 |
"""
|
@@ -101,7 +101,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
101 |
</p>
|
102 |
</div>""")
|
103 |
#gr.Markdown("""<h1><center>dummy</h1></center> """)
|
104 |
-
chatbot = gr.Chatbot()
|
105 |
state_in = gr.State()
|
106 |
with gr.Row():
|
107 |
text_in = gr.Textbox(value='', Placeholder="Enter your instructions here", elem_id = "input_prompt")
|
@@ -123,6 +123,15 @@ with gr.Blocks(css="style.css") as demo:
|
|
123 |
text_in.submit(chat,[btn_upload, image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid, img_name_temp_out,counter_out, image_oneup, text_in, state_in], [chatbot, state_in, image_hid, img_name_temp_out, counter_out])
|
124 |
text_in.submit(previous, [image_hid], [image_oneup])
|
125 |
#gr.Markdown(help_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
#demo.queue(concurrency_count=10)
|
128 |
demo.launch(debug=True, width="80%", height=2000)
|
63 |
font-size: 16px;
|
64 |
}
|
65 |
#chatbot-component {
|
66 |
+
height: 700px;
|
67 |
overflow-y: scroll;
|
68 |
}
|
69 |
"""
|
101 |
</p>
|
102 |
</div>""")
|
103 |
#gr.Markdown("""<h1><center>dummy</h1></center> """)
|
104 |
+
chatbot = gr.Chatbot(elem_id = 'chatbot-component')
|
105 |
state_in = gr.State()
|
106 |
with gr.Row():
|
107 |
text_in = gr.Textbox(value='', Placeholder="Enter your instructions here", elem_id = "input_prompt")
|
123 |
text_in.submit(chat,[btn_upload, image_in, in_steps, in_guidance_scale, in_img_guidance_scale, image_hid, img_name_temp_out,counter_out, image_oneup, text_in, state_in], [chatbot, state_in, image_hid, img_name_temp_out, counter_out])
|
124 |
text_in.submit(previous, [image_hid], [image_oneup])
|
125 |
#gr.Markdown(help_text)
|
126 |
+
|
127 |
+
#javascript testing
|
128 |
+
#btn.click(sentence_maker, [subject, verb, object], output1, _js="(s, v, o) => {
|
129 |
+
#let newElement = document.createElement('div');
|
130 |
+
#newElement.innerHTML = o + ' ' + v + ' ' + s;
|
131 |
+
#document.getElementById('chatbot-component').appendChild(newElement);
|
132 |
+
#newElement.scrollIntoView();
|
133 |
+
#}")
|
134 |
+
|
135 |
|
136 |
#demo.queue(concurrency_count=10)
|
137 |
demo.launch(debug=True, width="80%", height=2000)
|