Spaces:
Running
Running
Commit
·
c24ab89
1
Parent(s):
6130c96
app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,8 @@ def train_model(dataset_file: gr.File, batch_size: int, epochs: int, lr: float,
|
|
| 25 |
os.makedirs(MODEL_OUTPUT_DIR, exist_ok=True)
|
| 26 |
|
| 27 |
# 2. File Handling: Use the temporary path of the uploaded file
|
| 28 |
-
if dataset_file is None or not dataset_file.path.endswith(".json"):
|
| 29 |
-
|
| 30 |
|
| 31 |
input_path = dataset_file.path
|
| 32 |
|
|
|
|
| 25 |
os.makedirs(MODEL_OUTPUT_DIR, exist_ok=True)
|
| 26 |
|
| 27 |
# 2. File Handling: Use the temporary path of the uploaded file
|
| 28 |
+
# if dataset_file is None or not dataset_file.path.endswith(".json"):
|
| 29 |
+
# return "❌ ERROR: Please upload a valid Label Studio JSON file.", None
|
| 30 |
|
| 31 |
input_path = dataset_file.path
|
| 32 |
|