AnshulS commited on
Commit
b0d04b3
·
verified ·
1 Parent(s): 9967a24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py CHANGED
@@ -2,6 +2,26 @@ import pandas as pd
2
  import gradio as gr
3
  from retriever import get_relevant_passages
4
  from reranker import rerank
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  # Load and clean CSV
7
  def clean_df(df):
 
2
  import gradio as gr
3
  from retriever import get_relevant_passages
4
  from reranker import rerank
5
+ import gradio as gr
6
+ import json
7
+ from fastapi import FastAPI
8
+ from fastapi.responses import JSONResponse
9
+
10
+ with gr.Blocks() as demo:
11
+ # Your Gradio components here
12
+
13
+ @demo.load_fn
14
+ def setup_routes():
15
+ app = demo.app
16
+
17
+ @app.get("/health")
18
+ def health_check():
19
+ return JSONResponse(
20
+ content={"status": "healthy"},
21
+ status_code=200
22
+ )
23
+
24
+ demo.launch()
25
 
26
  # Load and clean CSV
27
  def clean_df(df):