test_gradio / app.py
John Smith
Update app.py
c9f40d2
raw
history blame
377 Bytes
import gradio as gr
import os
def image_mod(image):
print("Hello world")
return
demo = gr.Interface(
image_mod,
gr.Image(type="pil"),
"image",
flagging_options=["blurry", "incorrect", "other"],
examples=[
os.path.join(os.path.dirname(__file__), "n146OugAwBUjFACpuWrZUE6Q0-M.jpg"),
],
)
if __name__ == "__main__":
demo.launch()