ButteredToast commited on
Commit
2e6796d
·
verified ·
1 Parent(s): 65eb245

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- demo.launch()
 
 
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)