Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
π
Browse filesSigned-off-by: peter szemraj <[email protected]>
app.py
CHANGED
@@ -220,26 +220,29 @@ if __name__ == "__main__":
|
|
220 |
"Enter text below in the text area. The text will be summarized [using the selected parameters](https://huggingface.co/blog/how-to-generate). Optionally load an example below or upload a file."
|
221 |
)
|
222 |
with gr.Row(variant='compact'):
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
243 |
with gr.Row():
|
244 |
input_text = gr.Textbox(
|
245 |
lines=4,
|
|
|
220 |
"Enter text below in the text area. The text will be summarized [using the selected parameters](https://huggingface.co/blog/how-to-generate). Optionally load an example below or upload a file."
|
221 |
)
|
222 |
with gr.Row(variant='compact'):
|
223 |
+
with gr.Column(scale=0.5):
|
224 |
+
|
225 |
+
model_size = gr.Radio(
|
226 |
+
choices=["base", "large"], label="Model Variant", value="base"
|
227 |
+
)
|
228 |
+
num_beams = gr.Radio(
|
229 |
+
choices=[2, 3, 4],
|
230 |
+
label="Beam Search: # of Beams",
|
231 |
+
value=2,
|
232 |
+
)
|
233 |
+
with gr.Column():
|
234 |
+
gr.Markdown("Select an example, or upload a file (`.txt` or `.pdf`)")
|
235 |
+
with gr.Row(variant='compact'):
|
236 |
+
example_name = gr.Dropdown(
|
237 |
+
_examples,
|
238 |
+
label="Examples",
|
239 |
+
value=random.choice(_examples),
|
240 |
+
)
|
241 |
+
uploaded_file = gr.File(
|
242 |
+
label="File Upload",
|
243 |
+
file_count="single",
|
244 |
+
type="file",
|
245 |
+
)
|
246 |
with gr.Row():
|
247 |
input_text = gr.Textbox(
|
248 |
lines=4,
|