Michelvh commited on
Commit
ee3fab3
1 Parent(s): bf581a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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
- #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()
 
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()