Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,14 +99,14 @@ The optimal text lenght is probably around 8-10 lines. Longer text
|
|
99 |
will obviously take longer. Please keep in mind that this is a work in
|
100 |
progress and might still be a little bit buggy."""
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
iface = gr.Interface(fn=run_model_with_frames, inputs="text", outputs="text")
|
112 |
iface.launch()
|
|
|
99 |
will obviously take longer. Please keep in mind that this is a work in
|
100 |
progress and might still be a little bit buggy."""
|
101 |
|
102 |
+
with gr.Blocks() as iface:
|
103 |
+
gr.Markdown(description)
|
104 |
+
context = gr.Textbox(label="Input text")
|
105 |
+
frame_size = gr.Number(value=5, label="Batch size", info="Size of the subparts that are used to generate questions. Increase to speed up the generation", precision=0)
|
106 |
+
overlap = gr.Number(value=4, label="Overlap", info="Overlap between batches. Should be bigger than batch size. Decrease to speed up generation", precision=0)
|
107 |
+
questions = gr.Textbox(label="Questions")
|
108 |
+
generate_btn = gr.Button("Generate questions")
|
109 |
+
generate_btn.click(fn=run_model_with_frames, inputs=[context, frame_size, overlap], outputs=questions, api_name="generate_questions")
|
110 |
+
|
111 |
+
#iface = gr.Interface(fn=run_model_with_frames, inputs="text", outputs="text")
|
112 |
iface.launch()
|