andreska commited on
Commit
2565735
·
verified ·
1 Parent(s): 23bb001

Try configure for external access

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -1,12 +1,20 @@
1
  import gradio as gr
2
 
3
  def analyze(project_data, question):
4
- return f"Returns: input"
5
 
6
  iface = gr.Interface(
7
  fn=analyze,
8
- inputs=["text", "text"],
 
 
 
9
  outputs="text"
10
  )
11
 
12
- iface.launch(share=True)
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
  def analyze(project_data, question):
4
+ return f"Returns: {project_data}\nQuestion: {question}"
5
 
6
  iface = gr.Interface(
7
  fn=analyze,
8
+ inputs=[
9
+ gr.Textbox(label="Project Data"),
10
+ gr.Textbox(label="Question")
11
+ ],
12
  outputs="text"
13
  )
14
 
15
+ # Configure for external access
16
+ iface.launch(
17
+ server_name="0.0.0.0", # Allow external connections
18
+ share=True, # Create public URL
19
+ allowed_paths=["*"] # Allow CORS
20
+ )