Spaces:
Paused
Paused
Rishi Desai
commited on
Commit
·
aad4f65
1
Parent(s):
9b027fd
more examples, instructions
Browse files- demo.py +11 -9
- examples/chatgpt_dany_2.png +3 -0
- examples/enhanced_dany_2.png +3 -0
demo.py
CHANGED
|
@@ -57,10 +57,11 @@ def create_gradio_interface():
|
|
| 57 |
gr.Markdown("""
|
| 58 |
# Face Enhancement Demo
|
| 59 |
### Instructions
|
| 60 |
-
1. Upload
|
| 61 |
-
2. Upload a reference face image
|
| 62 |
3. Click 'Enhance Face' to start the process
|
| 63 |
-
|
|
|
|
| 64 |
""", elem_id="instructions")
|
| 65 |
|
| 66 |
# Add a horizontal line for separation
|
|
@@ -83,12 +84,13 @@ def create_gradio_interface():
|
|
| 83 |
queue=True # Enable queue for sequential processing
|
| 84 |
)
|
| 85 |
|
| 86 |
-
# Add examples
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
| 92 |
|
| 93 |
# Launch the Gradio app with queue
|
| 94 |
demo.queue(max_size=20) # Configure queue size
|
|
|
|
| 57 |
gr.Markdown("""
|
| 58 |
# Face Enhancement Demo
|
| 59 |
### Instructions
|
| 60 |
+
1. Upload the target image you want to enhance
|
| 61 |
+
2. Upload a high-quality reference face image
|
| 62 |
3. Click 'Enhance Face' to start the process
|
| 63 |
+
|
| 64 |
+
Processing takes about 60 seconds. Due to the constraints of this demo, face cropping and upscaling are not applied to the reference image.
|
| 65 |
""", elem_id="instructions")
|
| 66 |
|
| 67 |
# Add a horizontal line for separation
|
|
|
|
| 84 |
queue=True # Enable queue for sequential processing
|
| 85 |
)
|
| 86 |
|
| 87 |
+
# Add examples using gr.Examples
|
| 88 |
+
gr.Markdown("## Examples")
|
| 89 |
+
example_inps = [
|
| 90 |
+
["examples/chatgpt_dany_1.png", "examples/dany_face.jpg"],
|
| 91 |
+
["examples/chatgpt_dany_2.png", "examples/dany_face.jpg"]
|
| 92 |
+
]
|
| 93 |
+
gr.Examples(examples=example_inps, inputs=[input_image, ref_image], outputs=output_image)
|
| 94 |
|
| 95 |
# Launch the Gradio app with queue
|
| 96 |
demo.queue(max_size=20) # Configure queue size
|
examples/chatgpt_dany_2.png
ADDED
|
Git LFS Details
|
examples/enhanced_dany_2.png
ADDED
|
Git LFS Details
|