Spaces:
Runtime error
Runtime error
import gradio as gr | |
import requests | |
import io | |
from PIL import Image | |
from transformers import pipeline | |
from torchvision import transforms | |
title = "Fine Tuned SD Model - Authoral stylization" | |
description = "Automatically remove the image background from a profile photo." | |
article = "<p style='text-align: center'><a href='https://news.machinelearning.sg/posts/beautiful_profile_pics_remove_background_image_with_deeplabv3/'>Blog</a> | <a href='https://github.com/eugenesiow/practical-ml'>Github Repo</a></p>" | |
gr.Interface.load( | |
"spaces/eugenesiow/remove-bg", | |
inputs=[gr.Image(label="Input Image", source="webcam")] | |
).launch() | |
def greet(name): | |
return "Hello " + name + "!!" | |
with gr.Blocks(theme=gr.themes.Glass()) as demo: | |
name = gr.Textbox(label="Name") | |
output = gr.Textbox(label="Output Box") | |
greet_btn = gr.Button("Greet") | |
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet") | |
demo = gr.Interface( | |
fn=greet, | |
inputs=gr.Textbox(lines=2, placeholder="Name Here..."), | |
outputs="text", | |
) | |
demo.launch() |