Added basic functionality
Browse files- app.py +17 -0
- requirements.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
def picture_analysis(input_image) -> str:
|
| 5 |
+
return "This is a random genre"
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
demo = gr.Interface(
|
| 9 |
+
fn=picture_analysis,
|
| 10 |
+
inputs=gr.Image(type="filepath"),
|
| 11 |
+
outputs="textbox",
|
| 12 |
+
title="Painting Genre Analysis",
|
| 13 |
+
description="Upload an image to get the genre prediction"
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
if __name__ == "__main__":
|
| 17 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|