Spaces:
Running
Running
Update app.py
Browse files7 unmodified lines89101112131411 unmodified lines2627282930313233343536377 unmodified linesdef inference(img):os.system('mkdir test')basewidth = 512wpercent = (basewidth / float(img.size[0]))hsize = int((float(img.size[1]) * float(wpercent)))11 unmodified linesexamples = [['images/Blur1.png'], ['images/Blur2.png'], ['images/Blur5.png'],]gr.Interface(inference,[gr.inputs.Image(type="pil", label="Input")],gr.outputs.Image(type="filepath", label="Output"),title=title,description=description,article=article,allow_flagging=False,allow_screenshot=False,examples=examples).launch(debug=True)7 unmodified lines89101112131411 unmodified lines262728293031323334357 unmodified linesdef inference(img):os.makedirs("./test", exist_ok=True)basewidth = 512wpercent = (basewidth / float(img.size[0]))hsize = int((float(img.size[1]) * float(wpercent)))11 unmodified linesexamples = [['images/Blur1.png'], ['images/Blur2.png'], ['images/Blur5.png'],]gr.Interface(inference,[gr.components.Image(type="pil", label="Input")],gr.components.Image(type="filepath", label="Output"),title=title,description=description,article=article,examples=examples).launch(debug=True)
app.py+4-6