madamanastasia commited on
Commit
453d595
·
1 Parent(s): 3ba256c

Add root endpoint

Browse files
Files changed (1) hide show
  1. main.py +12 -0
main.py CHANGED
@@ -6,6 +6,18 @@ import pandas as pd
6
  import joblib
7
  from pathlib import Path
8
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  APP_DIR = Path(__file__).resolve().parent
10
  MODEL_PATH = APP_DIR / "pricing_model.joblib"
11
 
 
6
  import joblib
7
  from pathlib import Path
8
 
9
+
10
+ app = FastAPI()
11
+
12
+ @app.get("/", response_class=HTMLResponse)
13
+ def home():
14
+ return """
15
+ <h1>🚗 Getaround Pricing API</h1>
16
+ <p>Welcome to the Pricing Prediction API.</p>
17
+ <p>Go to <a href="/docs">/docs</a> to test the API.</p>
18
+ """
19
+
20
+
21
  APP_DIR = Path(__file__).resolve().parent
22
  MODEL_PATH = APP_DIR / "pricing_model.joblib"
23