Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ print("Starting AI Headshot Generator...")
|
|
| 3 |
|
| 4 |
import gradio as gr
|
| 5 |
import numpy as np
|
| 6 |
-
import spaces # ZeroGPU decorator comes from this package
|
| 7 |
|
| 8 |
# ======================
|
| 9 |
# Simple license system
|
|
@@ -38,7 +38,7 @@ def generate_headshot(image, license_key):
|
|
| 38 |
else:
|
| 39 |
h, w = image.shape[:2]
|
| 40 |
|
| 41 |
-
# Light
|
| 42 |
result = np.ones((h, w, 3), dtype=np.uint8) * 200
|
| 43 |
# Pink rectangle just for fun
|
| 44 |
result[50:150, 50:450] = [255, 182, 193]
|
|
@@ -49,7 +49,7 @@ def generate_headshot(image, license_key):
|
|
| 49 |
# ======================
|
| 50 |
# Gradio Interface
|
| 51 |
# ======================
|
| 52 |
-
with gr.Blocks(title="AI Headshot Generator"
|
| 53 |
gr.Markdown(
|
| 54 |
"""
|
| 55 |
# AI Headshot Generator
|
|
@@ -117,4 +117,4 @@ with gr.Blocks(title="AI Headshot Generator", theme=gr.themes.Soft()) as demo:
|
|
| 117 |
|
| 118 |
|
| 119 |
if __name__ == "__main__":
|
| 120 |
-
demo.launch()
|
|
|
|
| 3 |
|
| 4 |
import gradio as gr
|
| 5 |
import numpy as np
|
| 6 |
+
import spaces # ZeroGPU decorator comes from this package
|
| 7 |
|
| 8 |
# ======================
|
| 9 |
# Simple license system
|
|
|
|
| 38 |
else:
|
| 39 |
h, w = image.shape[:2]
|
| 40 |
|
| 41 |
+
# Light gray placeholder so you instantly see it works
|
| 42 |
result = np.ones((h, w, 3), dtype=np.uint8) * 200
|
| 43 |
# Pink rectangle just for fun
|
| 44 |
result[50:150, 50:450] = [255, 182, 193]
|
|
|
|
| 49 |
# ======================
|
| 50 |
# Gradio Interface
|
| 51 |
# ======================
|
| 52 |
+
with gr.Blocks(title="AI Headshot Generator") as demo:
|
| 53 |
gr.Markdown(
|
| 54 |
"""
|
| 55 |
# AI Headshot Generator
|
|
|
|
| 117 |
|
| 118 |
|
| 119 |
if __name__ == "__main__":
|
| 120 |
+
demo.launch(theme=gr.themes.Soft())
|