Updated path
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ app = FastAPI()
|
|
| 8 |
class ApiInput(BaseModel):
|
| 9 |
user_string: str
|
| 10 |
|
| 11 |
-
@app.post("/call_private_api")
|
| 12 |
def call_private_api(payload: ApiInput):
|
| 13 |
input_text = payload.user_string
|
| 14 |
return {"result": f"Processed: {input_text}"}
|
|
@@ -16,7 +16,7 @@ def call_private_api(payload: ApiInput):
|
|
| 16 |
with gr.Blocks() as demo:
|
| 17 |
gr.Markdown("# My Space Interface")
|
| 18 |
|
| 19 |
-
app = gr.mount_gradio_app(app, demo, path="/
|
| 20 |
|
| 21 |
# --- ADD THIS RUN BLOCK AT THE BOTTOM ---
|
| 22 |
if __name__ == "__main__":
|
|
|
|
| 8 |
class ApiInput(BaseModel):
|
| 9 |
user_string: str
|
| 10 |
|
| 11 |
+
@app.post("/api/call_private_api")
|
| 12 |
def call_private_api(payload: ApiInput):
|
| 13 |
input_text = payload.user_string
|
| 14 |
return {"result": f"Processed: {input_text}"}
|
|
|
|
| 16 |
with gr.Blocks() as demo:
|
| 17 |
gr.Markdown("# My Space Interface")
|
| 18 |
|
| 19 |
+
app = gr.mount_gradio_app(app, demo, path="/api")
|
| 20 |
|
| 21 |
# --- ADD THIS RUN BLOCK AT THE BOTTOM ---
|
| 22 |
if __name__ == "__main__":
|