Adding home
Browse files
app.py
CHANGED
|
@@ -27,6 +27,10 @@ def run_training(user_code: str):
|
|
| 27 |
except Exception as e:
|
| 28 |
print(f"--- Training Failed: {e} ---")
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
@app.post("/train")
|
| 31 |
def start_training(job: TrainingJob, background_tasks: BackgroundTasks):
|
| 32 |
|
|
|
|
| 27 |
except Exception as e:
|
| 28 |
print(f"--- Training Failed: {e} ---")
|
| 29 |
|
| 30 |
+
@app.get('/')
|
| 31 |
+
def read_root():
|
| 32 |
+
return {"message": "Welcome to the Training API!"}
|
| 33 |
+
|
| 34 |
@app.post("/train")
|
| 35 |
def start_training(job: TrainingJob, background_tasks: BackgroundTasks):
|
| 36 |
|