Spaces:
Running
Running
yizhangliu
commited on
Commit
•
6521610
1
Parent(s):
b5bbd1f
Update app.py
Browse files
app.py
CHANGED
@@ -275,6 +275,7 @@ interface = gr.Interface(fn=predict, inputs="image", outputs="image", sketchpad,
|
|
275 |
interface.launch(share=True)
|
276 |
'''
|
277 |
|
|
|
278 |
# gr.Interface(fn=predict, inputs="image", outputs="image").launch(share=True)
|
279 |
|
280 |
image = gr.Image(source='upload', tool='sketch', type="pil", label="Upload")# .style(height=400)
|
@@ -287,6 +288,24 @@ image_blocks = gr.Interface(
|
|
287 |
|
288 |
image_blocks.launch(inline=True)
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
'''
|
291 |
image_blocks = gr.Blocks(css=css)
|
292 |
with image_blocks as demo:
|
|
|
275 |
interface.launch(share=True)
|
276 |
'''
|
277 |
|
278 |
+
'''
|
279 |
# gr.Interface(fn=predict, inputs="image", outputs="image").launch(share=True)
|
280 |
|
281 |
image = gr.Image(source='upload', tool='sketch', type="pil", label="Upload")# .style(height=400)
|
|
|
288 |
|
289 |
image_blocks.launch(inline=True)
|
290 |
|
291 |
+
import gradio as gr
|
292 |
+
'''
|
293 |
+
|
294 |
+
def greet(name, is_morning, temperature):
|
295 |
+
salutation = "Good morning" if is_morning else "Good evening"
|
296 |
+
greeting = f"{salutation} {name}. It is {temperature} degrees today"
|
297 |
+
celsius = (temperature - 32) * 5 / 9
|
298 |
+
return greeting, round(celsius, 2)
|
299 |
+
|
300 |
+
demo = gr.Interface(
|
301 |
+
fn=greet,
|
302 |
+
inputs=["text", "checkbox", gr.Slider(0, 100)],
|
303 |
+
outputs=["text", "number"],
|
304 |
+
)
|
305 |
+
demo.launch()
|
306 |
+
|
307 |
+
|
308 |
+
|
309 |
'''
|
310 |
image_blocks = gr.Blocks(css=css)
|
311 |
with image_blocks as demo:
|