Spaces:
Runtime error
Runtime error
Try configure for external access
Browse files
app.py
CHANGED
|
@@ -1,12 +1,20 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def analyze(project_data, question):
|
| 4 |
-
return f"Returns:
|
| 5 |
|
| 6 |
iface = gr.Interface(
|
| 7 |
fn=analyze,
|
| 8 |
-
inputs=[
|
|
|
|
|
|
|
|
|
|
| 9 |
outputs="text"
|
| 10 |
)
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
)
|