NihalGazi commited on
Commit
55a429d
·
verified ·
1 Parent(s): 81d2759

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -22
app.py CHANGED
@@ -87,12 +87,11 @@ def process_video(
87
 
88
  # --- Gradio App ---
89
 
90
-
91
  css = """
92
- video, img { object-fit: contain !important; }
93
-
94
  @import url('https://fonts.googleapis.com/css2?family=Sulphur+Point:wght@700&display=swap');
95
 
 
 
96
  .sulphur-point-title {
97
  font-family: 'Sulphur Point', sans-serif;
98
  font-weight: 700;
@@ -103,12 +102,17 @@ video, img { object-fit: contain !important; }
103
  .description-text {
104
  font-size: 1em;
105
  line-height: 1.6;
 
106
  }
107
 
108
  .socials {
109
  font-size: 0.9em;
110
- margin-bottom: 1em;
111
  color: #555;
 
 
 
 
 
112
  }
113
 
114
  .example-section {
@@ -117,19 +121,6 @@ video, img { object-fit: contain !important; }
117
  """
118
 
119
  with gr.Blocks(css=css) as iface:
120
- # Socials at top
121
- gr.Markdown(
122
- """
123
- <div class="socials">
124
- **Contact & Socials:**
125
- 📷 Instagram: <a href="https://instagram.com/nihal_gazi_io" target="_blank">@nihal_gazi_io</a><br>
126
- 🐦 X (Twitter): <a href="https://x.com/NihalGazi_" target="_blank">@NihalGazi_</a><br>
127
- 💬 Discord: nihal_gazi_io<br>
128
- 📧 Email: [email protected]
129
- </div>
130
- """
131
- )
132
-
133
  # Title
134
  gr.HTML('<div class="sulphur-point-title">FaceFlux</div>')
135
 
@@ -152,7 +143,19 @@ with gr.Blocks(css=css) as iface:
152
  """
153
  )
154
 
155
- # Define inputs
 
 
 
 
 
 
 
 
 
 
 
 
156
  with gr.Row():
157
  vid = gr.Video(label='Input Video')
158
  ref = gr.Image(type='numpy', label='Reference Image')
@@ -161,15 +164,15 @@ with gr.Blocks(css=css) as iface:
161
  res = gr.Dropdown([256, 384, 512, 768], value=512, label='Face Resolution')
162
  quality = gr.Slider(1, 4, value=1, step=1, label='Quality')
163
  feather = gr.Slider(0.12, 0.24, value=0.12, step=0.01, label='Feather (%)')
164
- strength = gr.Slider(-0.35, -0.15, value=-0.25, step=0.05, label='Strength')
165
 
166
  btn = gr.Button('Generate Morph 🚀')
167
  out_vid = gr.Video(label='Morphed Video')
168
 
169
- # Now that components exist, insert the Examples
170
  gr.Examples(
171
  examples=[
172
- ["examples/input.mp4", "examples/reference.jpg", -0.25, 512, 1, 0.12]
173
  ],
174
  inputs=[vid, ref, strength, res, quality, feather],
175
  outputs=[out_vid],
@@ -184,4 +187,4 @@ with gr.Blocks(css=css) as iface:
184
  show_progress=True
185
  )
186
 
187
- iface.queue().launch(debug=True)
 
87
 
88
  # --- Gradio App ---
89
 
 
90
  css = """
 
 
91
  @import url('https://fonts.googleapis.com/css2?family=Sulphur+Point:wght@700&display=swap');
92
 
93
+ video, img { object-fit: contain !important; }
94
+
95
  .sulphur-point-title {
96
  font-family: 'Sulphur Point', sans-serif;
97
  font-weight: 700;
 
102
  .description-text {
103
  font-size: 1em;
104
  line-height: 1.6;
105
+ margin-bottom: 1em;
106
  }
107
 
108
  .socials {
109
  font-size: 0.9em;
 
110
  color: #555;
111
+ margin-bottom: 1.5em;
112
+ }
113
+
114
+ .socials li {
115
+ margin-bottom: 0.2em;
116
  }
117
 
118
  .example-section {
 
121
  """
122
 
123
  with gr.Blocks(css=css) as iface:
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  # Title
125
  gr.HTML('<div class="sulphur-point-title">FaceFlux</div>')
126
 
 
143
  """
144
  )
145
 
146
+ # Socials (vertical)
147
+ gr.Markdown(
148
+ """
149
+ <ul class="socials">
150
+ <li>📷 Instagram: <a href="https://instagram.com/nihal_gazi_io" target="_blank">@nihal_gazi_io</a></li>
151
+ <li>🐦 X (Twitter): <a href="https://x.com/NihalGazi_" target="_blank">@NihalGazi_</a></li>
152
+ <li>💬 Discord: nihal_gazi_io</li>
153
+ <li>📧 Email: [email protected]</li>
154
+ </ul>
155
+ """
156
+ )
157
+
158
+ # Inputs
159
  with gr.Row():
160
  vid = gr.Video(label='Input Video')
161
  ref = gr.Image(type='numpy', label='Reference Image')
 
164
  res = gr.Dropdown([256, 384, 512, 768], value=512, label='Face Resolution')
165
  quality = gr.Slider(1, 4, value=1, step=1, label='Quality')
166
  feather = gr.Slider(0.12, 0.24, value=0.12, step=0.01, label='Feather (%)')
167
+ strength = gr.Slider(-0.35, -0.15, value=-0.35, step=0.05, label='Strength')
168
 
169
  btn = gr.Button('Generate Morph 🚀')
170
  out_vid = gr.Video(label='Morphed Video')
171
 
172
+ # Example (after component definitions)
173
  gr.Examples(
174
  examples=[
175
+ ["examples/input.mp4", "examples/reference.jpg", -0.35, 512, 1, 0.12]
176
  ],
177
  inputs=[vid, ref, strength, res, quality, feather],
178
  outputs=[out_vid],
 
187
  show_progress=True
188
  )
189
 
190
+ iface.queue().launch(debug=True)