Transcendental-Programmer
commited on
Commit
·
afb8be0
1
Parent(s):
05f583d
Add Gradio frontend for interactive latent space exploration
Browse files- faceforge_ui/app.py +19 -0
faceforge_ui/app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import requests
|
3 |
+
|
4 |
+
def generate_image():
|
5 |
+
response = requests.post("http://localhost:8000/generate")
|
6 |
+
if response.ok:
|
7 |
+
return None # Placeholder: should return image from backend
|
8 |
+
return None
|
9 |
+
|
10 |
+
iface = gr.Interface(
|
11 |
+
fn=generate_image,
|
12 |
+
inputs=[],
|
13 |
+
outputs="image",
|
14 |
+
title="FaceForge Latent Space Explorer",
|
15 |
+
description="Interactively explore and edit faces in latent space."
|
16 |
+
)
|
17 |
+
|
18 |
+
if __name__ == "__main__":
|
19 |
+
iface.launch()
|