Karin0616 commited on
Commit
dc50072
ยท
1 Parent(s): 1937e4b
Files changed (1) hide show
  1. app.py +20 -14
app.py CHANGED
@@ -103,19 +103,25 @@ def sepia(input_img):
103
  fig = draw_plot(pred_img, seg)
104
  return fig
105
 
106
- with gr.Blocks() as demo:
107
 
108
-
109
-
110
- gr.MarkDown("This is a machine learning activity project at Kyunggi University.")
111
- with gr.Row():
112
- with gr.Column():
113
- inputs = gr.Image(shape=(564, 846))
114
- with gr.Column():
115
- outputs = ['plot']
116
- btn=gr.Button("Activate")
117
- btn.click(sepia,inputs=[inputs],outputs=[outputs])
118
- gr.Examples(["city1.jpg", "city2.jpg", "city3.jpg"],inputs=[inputs])
119
- if __name__ == "__main__":
120
- demo.launch()
 
 
 
 
 
 
 
121
 
 
103
  fig = draw_plot(pred_img, seg)
104
  return fig
105
 
 
106
 
107
+ demo = gr.Interface(fn=sepia,
108
+ inputs=gr.Image(shape=(564,846)),
109
+ outputs=['plot'],
110
+ live=True,
111
+ examples=["city1.jpg","city2.jpg","city3.jpg"],
112
+ allow_flagging='never',
113
+ title="This is a machine learning activity project at Kyunggi University.",
114
+ theme="darkpeach",
115
+ css="""
116
+ body {
117
+ background-color: dark;
118
+ color: white; /* ํฐํŠธ ์ƒ‰์ƒ ์ˆ˜์ • */
119
+ font-family: Arial, sans-serif; /* ํฐํŠธ ํŒจ๋ฐ€๋ฆฌ ์ˆ˜์ • */
120
+ }
121
+ """
122
+
123
+ )
124
+
125
+
126
+ demo.launch()
127