Spaces:
Sleeping
Sleeping
Update app/main.py
Browse files- app/main.py +0 -1
app/main.py
CHANGED
|
@@ -14,7 +14,6 @@ TEMP_DIR = "/tmp" # ✅ Répertoire autorisé en écriture sur Hugging Face
|
|
| 14 |
async def predict(file: UploadFile = File(...)):
|
| 15 |
temp_filename = f"{uuid.uuid4()}_{file.filename}"
|
| 16 |
temp_filepath = os.path.join(TEMP_DIR, temp_filename)
|
| 17 |
-
print(temp_filepath)
|
| 18 |
|
| 19 |
with open(temp_filepath, "wb") as buffer:
|
| 20 |
shutil.copyfileobj(file.file, buffer)
|
|
|
|
| 14 |
async def predict(file: UploadFile = File(...)):
|
| 15 |
temp_filename = f"{uuid.uuid4()}_{file.filename}"
|
| 16 |
temp_filepath = os.path.join(TEMP_DIR, temp_filename)
|
|
|
|
| 17 |
|
| 18 |
with open(temp_filepath, "wb") as buffer:
|
| 19 |
shutil.copyfileobj(file.file, buffer)
|