Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,9 +18,10 @@ async def root():
|
|
| 18 |
return {"message": "API is running"}
|
| 19 |
|
| 20 |
|
| 21 |
-
@app.post("/
|
| 22 |
async def enhance_img(file: UploadFile = File(...)):
|
| 23 |
try:
|
|
|
|
| 24 |
data = await file.read()
|
| 25 |
print('File read')
|
| 26 |
img = Image.open(io.BytesIO(data)).convert("RGB")
|
|
|
|
| 18 |
return {"message": "API is running"}
|
| 19 |
|
| 20 |
|
| 21 |
+
@app.post("/enhance-img")
|
| 22 |
async def enhance_img(file: UploadFile = File(...)):
|
| 23 |
try:
|
| 24 |
+
print('Inside the function')
|
| 25 |
data = await file.read()
|
| 26 |
print('File read')
|
| 27 |
img = Image.open(io.BytesIO(data)).convert("RGB")
|