Spaces:
Sleeping
Sleeping
update ui
Browse files
app.py
CHANGED
@@ -79,6 +79,20 @@ def ensure_questionmark(question):
|
|
79 |
return question
|
80 |
return question + "?"
|
81 |
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
iface.launch()
|
|
|
79 |
return question
|
80 |
return question + "?"
|
81 |
|
82 |
+
description = """
|
83 |
+
Input some Dutch text and click the button to generate some questions!
|
84 |
+
The model is currently set up to generate as many questions, but this
|
85 |
+
can take a couple of minutes so have some patience ;)
|
86 |
+
The optimal text lenght is porbably around 8-10 lines. Longer text
|
87 |
+
will obviously take longer. Please keep in mind that this is a work in
|
88 |
+
progress and might still be a little bit buggy."""
|
89 |
+
|
90 |
+
with gr.Blocks as iface:
|
91 |
+
gr.Markdown(description)
|
92 |
+
context = gr.Textbox(label="Input text")
|
93 |
+
questions = gr.Textbox(label="Questions")
|
94 |
+
generate_btn = gr.Button("Generate questions")
|
95 |
+
generate_btn.click(fn=run_model_with_frames, inputs=context, outputs=questions, api_name="generate_questions")
|
96 |
+
|
97 |
+
#iface = gr.Interface(fn=run_model_with_frames, inputs="text", outputs="text")
|
98 |
iface.launch()
|