rr19tech commited on
Commit
e449e18
·
verified ·
1 Parent(s): b7b13bb

Updated path

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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="/ui")
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__":