File size: 854 Bytes
78a8ca9
 
 
 
 
 
 
 
 
 
 
 
2926afe
 
 
 
 
 
 
 
 
 
78a8ca9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
from help_function import help_function
from PIL import Image
import numpy as np

model_helper = help_function()

def greet(numpy_image,text,float_value):
    PIL_image = Image.fromarray(np.uint8(numpy_image)).convert('RGB')
    image_edit = model_helper.image_from_text(text,PIL_image,float_value)
    return image_edit

description = "demo for model to edit face with text, you can see the [github repo CelebrityLook](https://github.com/amit154154/CelebrityLook)"
title = "FaceOver - edit face with text 🐨 "

iface = gr.Interface(fn=greet,
                     inputs=["image", "text", gr.inputs.Slider(0.0, 1.0)],
                     outputs="image",
                     title=f"🐦Raven - {title}",
                     description=description,
                     cache_examples=False
                     )
iface.launch()