Spaces:
Sleeping
Sleeping
wony617
commited on
Commit
•
11c2a9e
1
Parent(s):
d0343cc
fix: AttributeError while initializing Textbox
Browse files
app.py
CHANGED
@@ -172,7 +172,7 @@ with demo:
|
|
172 |
prompt_button = gr.Button("Show Full Prompt", variant="primary")
|
173 |
# TODO: add with_prompt_checkbox so people can freely use other services such as DeepL or Papago.
|
174 |
gr.Markdown("1. Copy with the button right-hand side and paste into [chat.openai.com](https://chat.openai.com).")
|
175 |
-
prompt_output = gr.Textbox(label="Full Prompt", lines=3
|
176 |
# TODO: add check for segments, indicating whether user should add or remove new lines from their input. (gr.Row)
|
177 |
gr.Markdown("2. After getting the complete translation, remove randomly inserted newlines on your favorite text editor and paste the result below.")
|
178 |
ui_translated_input = gr.Textbox(label="Cleaned ChatGPT initial translation")
|
@@ -182,8 +182,8 @@ with demo:
|
|
182 |
api_key_input = gr.Textbox(label="Your OpenAI API Key")
|
183 |
api_call_button = gr.Button("Translate (Call API)", variant="primary")
|
184 |
with gr.Row():
|
185 |
-
content_output = gr.Textbox(label="Original content"
|
186 |
-
final_output = gr.Textbox(label="Draft for review"
|
187 |
|
188 |
prompt_button.click(get_full_prompt, inputs=[language_input, filepath_input], outputs=prompt_output)
|
189 |
fill_button.click(fill_scaffold, inputs=[filepath_input, ui_translated_input], outputs=[content_output, final_output])
|
|
|
172 |
prompt_button = gr.Button("Show Full Prompt", variant="primary")
|
173 |
# TODO: add with_prompt_checkbox so people can freely use other services such as DeepL or Papago.
|
174 |
gr.Markdown("1. Copy with the button right-hand side and paste into [chat.openai.com](https://chat.openai.com).")
|
175 |
+
prompt_output = gr.Textbox(label="Full Prompt", lines=3, show_copy_button=True)
|
176 |
# TODO: add check for segments, indicating whether user should add or remove new lines from their input. (gr.Row)
|
177 |
gr.Markdown("2. After getting the complete translation, remove randomly inserted newlines on your favorite text editor and paste the result below.")
|
178 |
ui_translated_input = gr.Textbox(label="Cleaned ChatGPT initial translation")
|
|
|
182 |
api_key_input = gr.Textbox(label="Your OpenAI API Key")
|
183 |
api_call_button = gr.Button("Translate (Call API)", variant="primary")
|
184 |
with gr.Row():
|
185 |
+
content_output = gr.Textbox(label="Original content", show_copy_button=True)
|
186 |
+
final_output = gr.Textbox(label="Draft for review", show_copy_button=True)
|
187 |
|
188 |
prompt_button.click(get_full_prompt, inputs=[language_input, filepath_input], outputs=prompt_output)
|
189 |
fill_button.click(fill_scaffold, inputs=[filepath_input, ui_translated_input], outputs=[content_output, final_output])
|