Spaces:
Running
Running
Fix
Browse files
fluxai.py
CHANGED
@@ -88,7 +88,7 @@ async def upload_file(file: UploadFile = File(...)):
|
|
88 |
f.write(await file.read())
|
89 |
return JSONResponse(
|
90 |
status_code=200,
|
91 |
-
content={"url": f"https://randydev-ryuzaki-api.hf.space/uploads/{unique_filename}"}
|
92 |
)
|
93 |
except Exception as e:
|
94 |
return JSONResponse(
|
@@ -147,7 +147,7 @@ async def fluxai_image(payload: FluxAI):
|
|
147 |
f.write(enhanced_image_bytes.getvalue())
|
148 |
|
149 |
async def upload_file(file_path: str):
|
150 |
-
url = "https://randydev-ryuzaki-api.hf.space/uploadfile/"
|
151 |
async with httpx.AsyncClient() as client:
|
152 |
with open(file_path, "rb") as f:
|
153 |
response = await client.post(url, files={"file": f})
|
|
|
88 |
f.write(await file.read())
|
89 |
return JSONResponse(
|
90 |
status_code=200,
|
91 |
+
content={"url": f"https://randydev-ryuzaki-api.hf.space/api/v1/uploads/{unique_filename}"}
|
92 |
)
|
93 |
except Exception as e:
|
94 |
return JSONResponse(
|
|
|
147 |
f.write(enhanced_image_bytes.getvalue())
|
148 |
|
149 |
async def upload_file(file_path: str):
|
150 |
+
url = "https://randydev-ryuzaki-api.hf.space/api/v1/uploadfile/"
|
151 |
async with httpx.AsyncClient() as client:
|
152 |
with open(file_path, "rb") as f:
|
153 |
response = await client.post(url, files={"file": f})
|