Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,18 +151,15 @@ with gr.Blocks(css="""
|
|
| 151 |
.small-textbox textarea {height: 60px !important;}
|
| 152 |
.small-file-upload {max-height: 40px !important;}
|
| 153 |
.small-output textarea {height: 90px !important;}
|
| 154 |
-
""") as demo:
|
| 155 |
gr.Markdown("## π Select Interface Language")
|
| 156 |
|
| 157 |
with gr.Accordion("π View README / Usage Guide", open=False):
|
| 158 |
gr.Markdown("""This application allows you to upload a PDF or paste text, select your preferred summary language, and receive:
|
| 159 |
-
|
| 160 |
- A clear summary βοΈ
|
| 161 |
- An auto-generated title π·οΈ
|
| 162 |
- 5 relevant keywords π
|
| 163 |
-
|
| 164 |
If the content language and summary language differ, the app will auto-translate before summarizing π
|
| 165 |
-
|
| 166 |
Powered by OpenAI GPT-3.5 and Gradio.""")
|
| 167 |
|
| 168 |
lang_select = gr.Dropdown(label="Interface Language", choices=LANGUAGES, value="English")
|
|
@@ -170,10 +167,10 @@ Powered by OpenAI GPT-3.5 and Gradio.""")
|
|
| 170 |
|
| 171 |
with gr.Column(visible=False) as summary_section:
|
| 172 |
summary_lang = gr.Dropdown(choices=LANGUAGES, value="English")
|
| 173 |
-
char_limit = gr.Textbox(value="300")
|
| 174 |
-
text_input = gr.Textbox(lines=
|
| 175 |
-
pdf_file = gr.File()
|
| 176 |
-
output = gr.Textbox()
|
| 177 |
run_btn = gr.Button()
|
| 178 |
|
| 179 |
next_btn.click(fn=interface_selector, inputs=[lang_select], outputs=[
|
|
|
|
| 151 |
.small-textbox textarea {height: 60px !important;}
|
| 152 |
.small-file-upload {max-height: 40px !important;}
|
| 153 |
.small-output textarea {height: 90px !important;}
|
| 154 |
+
""") as demo:
|
| 155 |
gr.Markdown("## π Select Interface Language")
|
| 156 |
|
| 157 |
with gr.Accordion("π View README / Usage Guide", open=False):
|
| 158 |
gr.Markdown("""This application allows you to upload a PDF or paste text, select your preferred summary language, and receive:
|
|
|
|
| 159 |
- A clear summary βοΈ
|
| 160 |
- An auto-generated title π·οΈ
|
| 161 |
- 5 relevant keywords π
|
|
|
|
| 162 |
If the content language and summary language differ, the app will auto-translate before summarizing π
|
|
|
|
| 163 |
Powered by OpenAI GPT-3.5 and Gradio.""")
|
| 164 |
|
| 165 |
lang_select = gr.Dropdown(label="Interface Language", choices=LANGUAGES, value="English")
|
|
|
|
| 167 |
|
| 168 |
with gr.Column(visible=False) as summary_section:
|
| 169 |
summary_lang = gr.Dropdown(choices=LANGUAGES, value="English")
|
| 170 |
+
char_limit = gr.Textbox(value="300", elem_classes="small-textbox")
|
| 171 |
+
text_input = gr.Textbox(lines=3, max_lines=5, elem_classes="small-textbox")
|
| 172 |
+
pdf_file = gr.File(elem_classes="small-file-upload")
|
| 173 |
+
output = gr.Textbox(lines=4, elem_classes="small-output")
|
| 174 |
run_btn = gr.Button()
|
| 175 |
|
| 176 |
next_btn.click(fn=interface_selector, inputs=[lang_select], outputs=[
|