Update app.py
Browse files
app.py
CHANGED
@@ -43,15 +43,23 @@ def image_to_3d(image):
|
|
43 |
# Load the example image for the Gradio interface
|
44 |
example_image = load_example_image()
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
# Gradio interface setup
|
47 |
interface = gr.Interface(
|
48 |
fn=image_to_3d,
|
49 |
-
inputs=gr.Image(type="pil", label="Upload an Image
|
50 |
outputs="text", # Placeholder output (replace with 3D rendering if needed)
|
51 |
title="OpenLRM Mix-Large 1.1 - Image to 3D",
|
52 |
description="Upload an image to generate a 3D model using OpenLRM Mix-Large 1.1.",
|
53 |
-
examples=[[example_image]] if example_image else None # Include the example image if loaded
|
|
|
|
|
54 |
)
|
55 |
|
56 |
-
#
|
57 |
-
interface.launch()
|
|
|
43 |
# Load the example image for the Gradio interface
|
44 |
example_image = load_example_image()
|
45 |
|
46 |
+
# Description of image types to upload
|
47 |
+
image_type_description = """
|
48 |
+
Upload a clear image of a single object with minimal background distractions for best results. Example image types:
|
49 |
+
- Objects such as cars, furniture, geometric shapes, or architectural structures.
|
50 |
+
"""
|
51 |
+
|
52 |
# Gradio interface setup
|
53 |
interface = gr.Interface(
|
54 |
fn=image_to_3d,
|
55 |
+
inputs=gr.Image(type="pil", label="Upload an Image"),
|
56 |
outputs="text", # Placeholder output (replace with 3D rendering if needed)
|
57 |
title="OpenLRM Mix-Large 1.1 - Image to 3D",
|
58 |
description="Upload an image to generate a 3D model using OpenLRM Mix-Large 1.1.",
|
59 |
+
examples=[[example_image]] if example_image else None, # Include the example image if loaded
|
60 |
+
theme="compact", # Compact layout for better UI experience
|
61 |
+
allow_flagging="never"
|
62 |
)
|
63 |
|
64 |
+
# Display a suggestion below the upload widget
|
65 |
+
interface.launch(description=image_type_description)
|