Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| def face_projection(text): | |
| processed_text = preprocess_text(text) | |
| face_image = generate_face_image(processed_text) | |
| return face_image | |
| def preprocess_text(text): | |
| return text | |
| def generate_face_image(processed_text): | |
| face_projection_pipeline = pipeline("text2image", model="Purz/face-projection") | |
| face_image = face_projection_pipeline(processed_text) | |
| return face_image | |
| iface = gr.Interface( | |
| fn=face_projection, | |
| inputs="text", | |
| outputs="image", | |
| title="Face Projection from Text" | |
| ) | |
| iface.launch() |