Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def generate_text(input_text):
|
|
| 19 |
except Exception as e:
|
| 20 |
return f"Error generating text: {e}"
|
| 21 |
|
| 22 |
-
# Set up Gradio interface
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=generate_text,
|
| 25 |
inputs="text",
|
|
@@ -28,4 +28,5 @@ demo = gr.Interface(
|
|
| 28 |
description="Chat with ToastBot, your AI assistant!"
|
| 29 |
)
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
| 19 |
except Exception as e:
|
| 20 |
return f"Error generating text: {e}"
|
| 21 |
|
| 22 |
+
# Set up Gradio interface with API enabled
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=generate_text,
|
| 25 |
inputs="text",
|
|
|
|
| 28 |
description="Chat with ToastBot, your AI assistant!"
|
| 29 |
)
|
| 30 |
|
| 31 |
+
# Enable API mode for external requests
|
| 32 |
+
demo.launch(share=True, enable_queue=True)
|