plaggy commited on
Commit
60d1cfd
·
1 Parent(s): 187981b

minor fixes

Browse files
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -37,7 +37,7 @@ INPUT_SPLITS = os.getenv("INPUT_SPLITS")
37
  # name of column to load from input dataset
38
  INPUT_TEXT_COL = os.getenv("INPUT_TEXT_COL")
39
 
40
- # INPUT_SPLITS = [spl.strip() for spl in INPUT_SPLITS.split(",") if spl]
41
 
42
  app = FastAPI()
43
  app.state.seen_Sha = set()
@@ -45,10 +45,10 @@ app.state.seen_Sha = set()
45
  app.mount("/static", StaticFiles(directory="static"), name="static")
46
  templates = Jinja2Templates(directory="templates")
47
 
 
48
  @app.get("/", response_class=HTMLResponse)
49
  async def root(request: Request):
50
  return templates.TemplateResponse(request=request, name="index.html")
51
- # return FileResponse("/Users/spetrov/Documents/PROJECTS/hub_etl_pipeline/auto-chunk-embed/templates/index.html")
52
 
53
 
54
  @app.post("/webhook")
@@ -211,6 +211,6 @@ def embed_dataset(ds_name):
211
 
212
  # For debugging
213
 
214
- import uvicorn
215
- if __name__ == "__main__":
216
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
37
  # name of column to load from input dataset
38
  INPUT_TEXT_COL = os.getenv("INPUT_TEXT_COL")
39
 
40
+ INPUT_SPLITS = [spl.strip() for spl in INPUT_SPLITS.split(",") if spl]
41
 
42
  app = FastAPI()
43
  app.state.seen_Sha = set()
 
45
  app.mount("/static", StaticFiles(directory="static"), name="static")
46
  templates = Jinja2Templates(directory="templates")
47
 
48
+
49
  @app.get("/", response_class=HTMLResponse)
50
  async def root(request: Request):
51
  return templates.TemplateResponse(request=request, name="index.html")
 
52
 
53
 
54
  @app.post("/webhook")
 
211
 
212
  # For debugging
213
 
214
+ # import uvicorn
215
+ # if __name__ == "__main__":
216
+ # uvicorn.run(app, host="0.0.0.0", port=7860)