hrguarinv commited on
Commit
4e3ede3
·
verified ·
1 Parent(s): 92f8cbf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -1,5 +1,21 @@
1
  import gradio as gr
2
  import requests
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
 
5
  def fastlane_agent(message, history):
@@ -35,7 +51,6 @@ iface = gr.ChatInterface(
35
  retry_btn=None,
36
  undo_btn="Delete Previous",
37
  clear_btn="Clear"
38
- )
39
 
40
- if __name__ == "__main__":
41
- iface.launch()
 
1
  import gradio as gr
2
  import requests
3
+ from fastapi import FastAPI
4
+ from routes import query_handler, purchase, order_management, account_management, customer_support, search_products
5
+
6
+ app = FastAPI()
7
+
8
+ app.include_router(purchase.router, prefix="/purchase", tags=["purchase"])
9
+ app.include_router(order_management.router,
10
+ prefix="/order-management", tags=["order-management"])
11
+ app.include_router(account_management.router,
12
+ prefix="/account-management", tags=["account-management"])
13
+ app.include_router(customer_support.router,
14
+ prefix="/customer-support", tags=["customer-support"])
15
+ app.include_router(search_products.router,
16
+ prefix="/search-products", tags=["search-products"])
17
+ app.include_router(query_handler.router,
18
+ prefix="/query-handler", tags=["query-handler"])
19
 
20
 
21
  def fastlane_agent(message, history):
 
51
  retry_btn=None,
52
  undo_btn="Delete Previous",
53
  clear_btn="Clear"
54
+ ).launch()
55
 
56
+ app = gr.mount_gradio_app(app, iface, path="./")