mrbeliever
commited on
Commit
•
dcd919f
1
Parent(s):
186fdbf
Update app.py
Browse files
app.py
CHANGED
@@ -132,12 +132,13 @@ output_text_component = gr.Textbox(
|
|
132 |
value="",
|
133 |
placeholder="Generated text will appear here",
|
134 |
scale=8,
|
|
|
135 |
)
|
136 |
|
137 |
def copy_text():
|
138 |
output_text_component.copy()
|
139 |
|
140 |
-
|
141 |
"<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' "
|
142 |
"fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' "
|
143 |
"stroke-linejoin='round' class='feather feather-copy' onclick='copyText()'>"
|
@@ -153,8 +154,6 @@ output_copy_icon = gr.HTML(
|
|
153 |
"</script>"
|
154 |
)
|
155 |
|
156 |
-
output_text_component_copy = gr.OutputComponent([output_text_component, output_copy_icon])
|
157 |
-
|
158 |
text_prompt_component = gr.Textbox(
|
159 |
placeholder="Hi there! [press Enter]",
|
160 |
show_label=False,
|
@@ -219,7 +218,7 @@ with gr.Blocks() as demo:
|
|
219 |
outputs=[output_text_component, chatbot_component],
|
220 |
queue=False
|
221 |
).then(
|
222 |
-
fn=bot, inputs=bot_inputs, outputs=[
|
223 |
)
|
224 |
|
225 |
upload_button_component.upload(
|
@@ -231,5 +230,3 @@ with gr.Blocks() as demo:
|
|
231 |
|
232 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|
233 |
|
234 |
-
|
235 |
-
|
|
|
132 |
value="",
|
133 |
placeholder="Generated text will appear here",
|
134 |
scale=8,
|
135 |
+
multiline=True,
|
136 |
)
|
137 |
|
138 |
def copy_text():
|
139 |
output_text_component.copy()
|
140 |
|
141 |
+
output_text_component_copy = gr.HTML(
|
142 |
"<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' "
|
143 |
"fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' "
|
144 |
"stroke-linejoin='round' class='feather feather-copy' onclick='copyText()'>"
|
|
|
154 |
"</script>"
|
155 |
)
|
156 |
|
|
|
|
|
157 |
text_prompt_component = gr.Textbox(
|
158 |
placeholder="Hi there! [press Enter]",
|
159 |
show_label=False,
|
|
|
218 |
outputs=[output_text_component, chatbot_component],
|
219 |
queue=False
|
220 |
).then(
|
221 |
+
fn=bot, inputs=bot_inputs, outputs=[output_text_component_copy],
|
222 |
)
|
223 |
|
224 |
upload_button_component.upload(
|
|
|
230 |
|
231 |
demo.queue(max_size=99).launch(debug=False, show_error=True)
|
232 |
|
|
|
|