Update app.py
Browse files
app.py
CHANGED
@@ -75,17 +75,12 @@ def draw_bar_chart(data: dict[str, list[str | float]]):
|
|
75 |
|
76 |
plt.tight_layout()
|
77 |
|
78 |
-
|
79 |
-
plt.save(img, format="png")
|
80 |
-
plt.close
|
81 |
-
|
82 |
-
bimg.seek(0)
|
83 |
-
img = Image.open(bimg)
|
84 |
-
|
85 |
-
return img
|
86 |
|
87 |
|
88 |
def get_layout():
|
|
|
|
|
89 |
css = """
|
90 |
.main-title {
|
91 |
font-size: 24px;
|
|
|
75 |
|
76 |
plt.tight_layout()
|
77 |
|
78 |
+
return plt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
|
81 |
def get_layout():
|
82 |
+
demo = gr.Interface(fn=Classifier().predict, inputs="image", outputs="plot")
|
83 |
+
return demo
|
84 |
css = """
|
85 |
.main-title {
|
86 |
font-size: 24px;
|