Spaces:
Runtime error
Runtime error
import os | |
os.system("hub install deoldify==1.0.1") | |
import gradio as gr | |
import paddlehub as hub | |
from pathlib import Path | |
model = hub.Module(name='deoldify') | |
def inference(image): | |
model.predict(image.name) | |
return './output/DeOldify/'+Path(image.name).stem+".png" | |
title = "DeOldify" | |
description = "DeOldify Videos" | |
description = "Gradio demo for DeOldify-Videos. This was developed as a team project, do refer our GitHub page for source code" | |
article = "<p style='text-align: center'><a href='https://github.com/preetshah7/Deoldify-Videos' target='_blank'>Github Repo</a></p><h2 style='text-align:center'><span style='color:#000099'><strong><span style='background-color:#ffffff'>Deoldify - Videos | Seasons of Code</span></strong></span></h2><hr /><p style='text-align:center'><img alt='WnCC, IIT Bombay' src='https://scontent.fpnq13-2.fna.fbcdn.net/v/t1.18169-1/14184381_1237298596323103_1892776805217574487_n.jpg?stp=dst-jpg_p148x148&_nc_cat=100&ccb=1-7&_nc_sid=1eb0c7&_nc_ohc=TYhkjP-JhWgAX8jsWrL&_nc_ht=scontent.fpnq13-2.fna&oh=00_AT8wU2x1L6qO4tK5lxdPgoMxcJidXd7NEP8IIGJZyWltUA&oe=63130355' style='float:right; height:85px; width:85px' /><img alt='Indian Institute of Technology, Bombay' src='https://www.iitb.ac.in/sites/www.iitb.ac.in/themes/touchm/logo.png' style='float:left; height:83px; width:85px' /><span style='color:#000099'><span style='font-size:14px'><strong><span style='background-color:#ffffff'>Mentored by: Preet Shah</span></strong></span></span></p><p style='text-align:center'>Co-Mentor: Yash Shah</p><p style='text-align:center'><em>Team: Shashwat, Aum, Atishay, Oshin</em></p><p style='text-align:center'><em>Gautham, Omkar, Chandramouli</em></p><p style='text-align:center'> </p>" | |
css_code = 'body{background-image:url("https://burningmanagementblog.files.wordpress.com/2020/03/image.jpg?w=529");}' | |
thumbnail_img = "thumbnail.jpeg" | |
examples=[['lunch.jpeg']] | |
iface = gr.Interface(inference, inputs=gr.inputs.Image(type="file"), outputs=gr.outputs.Image(type="file"),examples=examples,enable_queue=True,title=title,article=article,description=description, thumbnail=thumbnail_img) | |
iface.launch(debug=True) |