Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -3,17 +3,17 @@ from fastapi.responses import StreamingResponse
|
|
| 3 |
import os
|
| 4 |
import io
|
| 5 |
|
| 6 |
-
f = open("/data/aa.txt","w")
|
| 7 |
|
| 8 |
app = FastAPI()
|
| 9 |
|
| 10 |
# Define the directory to store uploaded files
|
| 11 |
-
UPLOAD_DIR = "/
|
| 12 |
|
| 13 |
@app.on_event("startup")
|
| 14 |
def startup_event():
|
| 15 |
# Check and create the directory if it doesn't exist
|
| 16 |
os.makedirs(UPLOAD_DIR, exist_ok=True)
|
|
|
|
| 17 |
|
| 18 |
@app.get("/")
|
| 19 |
def read_root():
|
|
|
|
| 3 |
import os
|
| 4 |
import io
|
| 5 |
|
|
|
|
| 6 |
|
| 7 |
app = FastAPI()
|
| 8 |
|
| 9 |
# Define the directory to store uploaded files
|
| 10 |
+
UPLOAD_DIR = "/data"
|
| 11 |
|
| 12 |
@app.on_event("startup")
|
| 13 |
def startup_event():
|
| 14 |
# Check and create the directory if it doesn't exist
|
| 15 |
os.makedirs(UPLOAD_DIR, exist_ok=True)
|
| 16 |
+
print("created")
|
| 17 |
|
| 18 |
@app.get("/")
|
| 19 |
def read_root():
|