Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -185,14 +185,13 @@ def generate_questions(paragraph):
|
|
| 185 |
|
| 186 |
return "\n".join([f"{i+1}. {q}" for i, q in enumerate(questions)])
|
| 187 |
|
| 188 |
-
# Create Gradio interface
|
| 189 |
demo = gr.Interface(
|
| 190 |
fn=generate_questions,
|
| 191 |
inputs=gr.Textbox(lines=10, placeholder="Enter a paragraph to generate questions..."),
|
| 192 |
outputs=gr.Textbox(label="Generated Questions"),
|
| 193 |
title="Paragraph to Questions Generator",
|
| 194 |
description="Enter a paragraph and the model will generate relevant questions based on the content.",
|
| 195 |
-
allow_flagging="never" # Disable flagging option which can include share links
|
| 196 |
)
|
| 197 |
|
| 198 |
# For use as a module in other Hugging Face applications
|
|
@@ -201,10 +200,4 @@ def generate_questions_from_text(text):
|
|
| 201 |
|
| 202 |
# Launch the app if running directly
|
| 203 |
if __name__ == "__main__":
|
| 204 |
-
|
| 205 |
-
demo.launch(
|
| 206 |
-
share=False, # Disable standard sharing
|
| 207 |
-
enable_queue=False, # Disable queue which can sometimes trigger share links
|
| 208 |
-
show_api=False, # Disable API info which includes share options
|
| 209 |
-
show_error=True, # Still show errors for debugging
|
| 210 |
-
)
|
|
|
|
| 185 |
|
| 186 |
return "\n".join([f"{i+1}. {q}" for i, q in enumerate(questions)])
|
| 187 |
|
| 188 |
+
# Create Gradio interface
|
| 189 |
demo = gr.Interface(
|
| 190 |
fn=generate_questions,
|
| 191 |
inputs=gr.Textbox(lines=10, placeholder="Enter a paragraph to generate questions..."),
|
| 192 |
outputs=gr.Textbox(label="Generated Questions"),
|
| 193 |
title="Paragraph to Questions Generator",
|
| 194 |
description="Enter a paragraph and the model will generate relevant questions based on the content.",
|
|
|
|
| 195 |
)
|
| 196 |
|
| 197 |
# For use as a module in other Hugging Face applications
|
|
|
|
| 200 |
|
| 201 |
# Launch the app if running directly
|
| 202 |
if __name__ == "__main__":
|
| 203 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|