Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,4 +19,14 @@ def identify_vehicle(image):
|
|
| 19 |
)
|
| 20 |
return response.choices[0].message.content
|
| 21 |
except Exception as e:
|
| 22 |
-
return f"Error: {e}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
)
|
| 20 |
return response.choices[0].message.content
|
| 21 |
except Exception as e:
|
| 22 |
+
return f"Error: {e}"
|
| 23 |
+
interface = gr.Interface(
|
| 24 |
+
fn=identify_vehicle,
|
| 25 |
+
inputs=gr.Image(type="pil", label="Upload a car or part photo"),
|
| 26 |
+
outputs="text",
|
| 27 |
+
title="AutoIQ",
|
| 28 |
+
description="Upload a car or part photo. AutoIQ will identify the make, model, year, or visible components."
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
if __name__ == "__main__":
|
| 32 |
+
interface.launch()
|