arpy8 commited on
Commit
bddaf38
1 Parent(s): d934364

add root route in app

Browse files
Files changed (2) hide show
  1. .gitignore +3 -1
  2. app/main.py +5 -0
.gitignore CHANGED
@@ -2,4 +2,6 @@
2
  app/model_creation copy.py
3
 
4
  .venv/
5
- __pycache__/
 
 
 
2
  app/model_creation copy.py
3
 
4
  .venv/
5
+ __pycache__/
6
+
7
+ test/
app/main.py CHANGED
@@ -9,6 +9,11 @@ from .model_creation import process_dataset
9
 
10
  app = FastAPI()
11
 
 
 
 
 
 
12
  @app.post("/upload/")
13
  async def upload_file(target_variable: str = Form(...),
14
  problem_type: str = Form(...),
 
9
 
10
  app = FastAPI()
11
 
12
+
13
+ @app.post("/")
14
+ def read_root():
15
+ return {"message": "Welcome to the SwiftML Model Creation API!"}
16
+
17
  @app.post("/upload/")
18
  async def upload_file(target_variable: str = Form(...),
19
  problem_type: str = Form(...),