AhmedIbrahim007
commited on
Commit
•
10e6ed7
1
Parent(s):
026cee8
Update app.py
Browse files
app.py
CHANGED
@@ -62,10 +62,10 @@ async def process_file(file_data: FileProcess):
|
|
62 |
try:
|
63 |
if file_type in ['jpg', 'jpeg', 'png', 'bmp']:
|
64 |
output_image = process_image(tmp_file_path)
|
65 |
-
result = {"type": "image", "
|
66 |
elif file_type in ['mp4', 'avi', 'mov', 'wmv']:
|
67 |
video_output = process_video(str(tmp_file_path))
|
68 |
-
result = {"type": "video", "
|
69 |
else:
|
70 |
raise HTTPException(status_code=400, detail="Unsupported file type")
|
71 |
|
|
|
62 |
try:
|
63 |
if file_type in ['jpg', 'jpeg', 'png', 'bmp']:
|
64 |
output_image = process_image(tmp_file_path)
|
65 |
+
result = {"type": "image", "data": output_image}
|
66 |
elif file_type in ['mp4', 'avi', 'mov', 'wmv']:
|
67 |
video_output = process_video(str(tmp_file_path))
|
68 |
+
result = {"type": "video", "data": video_output}
|
69 |
else:
|
70 |
raise HTTPException(status_code=400, detail="Unsupported file type")
|
71 |
|