Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,7 +149,7 @@ def process_image_menHair(background_image, x, y, placeholder_image_path, x_coor
|
|
| 149 |
placeholder_alpha = placeholder_image.split()[3] if placeholder_image.mode == 'RGBA' else None
|
| 150 |
|
| 151 |
# Function to generate Funko figurines
|
| 152 |
-
def generate_funko_figurines(input_image
|
| 153 |
# Detect and classify beard style
|
| 154 |
beard_classifier = BeardClassifier('Data/FunkoSavedModels/FunkoResnet18BeardStyle.pt', ['Bandholz', 'CleanShave', 'FullGoatee', 'Moustache', 'RapIndustryStandards', 'ShortBeard'])
|
| 155 |
predicted_style_label = beard_classifier.classify_beard(input_image)
|
|
@@ -242,7 +242,7 @@ background_images = [gr.inputs.Image(type="pil", label="Background Image " + str
|
|
| 242 |
# Create Gradio interface
|
| 243 |
gr.Interface(
|
| 244 |
fn=generate_funko_figurines,
|
| 245 |
-
inputs=
|
| 246 |
outputs=[gr.outputs.Image(type="numpy", label="Generated Image " + str(i + 1)) for i in range(3)],
|
| 247 |
title="Funko Figurine Generator",
|
| 248 |
description="Generate personalized Funko figurines with different styles and backgrounds.",
|
|
|
|
| 149 |
placeholder_alpha = placeholder_image.split()[3] if placeholder_image.mode == 'RGBA' else None
|
| 150 |
|
| 151 |
# Function to generate Funko figurines
|
| 152 |
+
def generate_funko_figurines(input_image):
|
| 153 |
# Detect and classify beard style
|
| 154 |
beard_classifier = BeardClassifier('Data/FunkoSavedModels/FunkoResnet18BeardStyle.pt', ['Bandholz', 'CleanShave', 'FullGoatee', 'Moustache', 'RapIndustryStandards', 'ShortBeard'])
|
| 155 |
predicted_style_label = beard_classifier.classify_beard(input_image)
|
|
|
|
| 242 |
# Create Gradio interface
|
| 243 |
gr.Interface(
|
| 244 |
fn=generate_funko_figurines,
|
| 245 |
+
inputs=input_image,
|
| 246 |
outputs=[gr.outputs.Image(type="numpy", label="Generated Image " + str(i + 1)) for i in range(3)],
|
| 247 |
title="Funko Figurine Generator",
|
| 248 |
description="Generate personalized Funko figurines with different styles and backgrounds.",
|