Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ LANGUAGE_CODES = {
|
|
| 15 |
"French": "fr",
|
| 16 |
"German": "de",
|
| 17 |
"Spanish": "es",
|
| 18 |
-
"Arabic": "ar"
|
| 19 |
}
|
| 20 |
|
| 21 |
QUIZ_TITLES = {
|
|
@@ -124,18 +124,20 @@ Powered by OpenAI GPT-3.5 and Gradio.
|
|
| 124 |
''')
|
| 125 |
|
| 126 |
with gr.Row():
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 130 |
|
| 131 |
-
|
|
|
|
| 132 |
|
| 133 |
-
|
| 134 |
-
text_input = gr.Textbox(lines=6, label="Text Input")
|
| 135 |
-
pdf_file = gr.File(label="Or Upload PDF")
|
| 136 |
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
|
|
|
|
|
|
| 140 |
|
| 141 |
-
|
|
|
|
| 15 |
"French": "fr",
|
| 16 |
"German": "de",
|
| 17 |
"Spanish": "es",
|
| 18 |
+
"Arabic": "ar"
|
| 19 |
}
|
| 20 |
|
| 21 |
QUIZ_TITLES = {
|
|
|
|
| 124 |
''')
|
| 125 |
|
| 126 |
with gr.Row():
|
| 127 |
+
with gr.Column(scale=2):
|
| 128 |
+
text_input = gr.Textbox(label="Text Input", lines=15)
|
| 129 |
+
with gr.Column(scale=2):
|
| 130 |
+
pdf_file = gr.File(label="Or Upload PDF", file_types=[".pdf"])
|
| 131 |
|
| 132 |
+
# Output küçük kutu
|
| 133 |
+
output = gr.Textbox(label="Output", lines=7)
|
| 134 |
|
| 135 |
+
run_btn = gr.Button("Summarize")
|
|
|
|
|
|
|
| 136 |
|
| 137 |
+
run_btn.click(
|
| 138 |
+
fn=analyze_input,
|
| 139 |
+
inputs=[summary_lang, summary_style, char_limit, text_input, pdf_file, generate_quiz],
|
| 140 |
+
outputs=output
|
| 141 |
+
)
|
| 142 |
|
| 143 |
+
demo.launch()
|