Rishi Desai commited on
Commit
aad4f65
·
1 Parent(s): 9b027fd

more examples, instructions

Browse files
demo.py CHANGED
@@ -57,10 +57,11 @@ def create_gradio_interface():
57
  gr.Markdown("""
58
  # Face Enhancement Demo
59
  ### Instructions
60
- 1. Upload an image you want to enhance
61
- 2. Upload a reference face image
62
  3. Click 'Enhance Face' to start the process
63
- 4. Processing takes about 60 seconds
 
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 at the bottom in a table format
87
- with gr.Row():
88
- gr.Markdown("### Examples")
89
- with gr.Column():
90
- gr.Image("examples/chatgpt_dany_1.png", label="Target Image Example")
91
- gr.Image("examples/dany_face.jpg", label="Reference Face Example")
 
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

  • SHA256: 4191bfdaa021f168b787683aecebb6e5be0fe5b7e2df56c9b007dab585fd8ec1
  • Pointer size: 132 Bytes
  • Size of remote file: 2.14 MB
examples/enhanced_dany_2.png ADDED

Git LFS Details

  • SHA256: c64e50cb951f74adf008e0c273ac060328d410b42d744050388ca197c1d35450
  • Pointer size: 132 Bytes
  • Size of remote file: 1.93 MB