LogicDataSolutions commited on
Commit
e5e5f57
·
verified ·
1 Parent(s): 18cec4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -79,9 +79,9 @@ def call_langflow(message, history):
79
  return f"Error parsing response: {str(e)}\nResponse: {data}"
80
 
81
  #Create FastAPI App for health check.
82
- app = FastAPI(title="Chatbot with Ping API")
83
  # Optional CORS setup
84
- app.add_middleware(
85
  CORSMiddleware,
86
  allow_origins=["*"],
87
  allow_credentials=True,
@@ -112,4 +112,4 @@ with gr.Blocks(
112
  )
113
 
114
  # Mount Gradio app to FastAPI at root path
115
- app = gr.mount_gradio_app(app, demo, path="/")
 
79
  return f"Error parsing response: {str(e)}\nResponse: {data}"
80
 
81
  #Create FastAPI App for health check.
82
+ fastapi_app = FastAPI(title="Chatbot with Ping API")
83
  # Optional CORS setup
84
+ fastapi_app.add_middleware(
85
  CORSMiddleware,
86
  allow_origins=["*"],
87
  allow_credentials=True,
 
112
  )
113
 
114
  # Mount Gradio app to FastAPI at root path
115
+ app = gr.mount_gradio_app(fastapi_appapp, demo, path="/")