alex commited on
Commit
bf8d717
·
1 Parent(s): 4257e1b

better layout

Browse files
Files changed (1) hide show
  1. app.py +23 -12
app.py CHANGED
@@ -138,6 +138,25 @@ def resize_for_model(image_path):
138
  )
139
  return new_img, target_size
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  @spaces.GPU(duration=160)
142
  def generate_video(
143
  text_prompt,
@@ -211,15 +230,7 @@ def generate_image(text_prompt, image_seed, image_height, image_width):
211
  css = """
212
  #col-container {
213
  margin: 0 auto;
214
- max-width: 1560px;
215
- }
216
- /* editable vs locked, reusing theme variables that adapt to dark/light */
217
- .stateful textarea:not(:disabled):not([readonly]) {
218
- color: var(--color-text) !important; /* accent in both modes */
219
- }
220
- .stateful textarea:disabled,
221
- .stateful textarea[readonly]{
222
- color: var(--body-text-color-subdued) !important; /* subdued in both modes */
223
  }
224
  """
225
 
@@ -230,15 +241,15 @@ with gr.Blocks(css=css) as demo:
230
  with gr.Column(elem_id="col-container"):
231
  gr.HTML(
232
  """
233
- <div style="text-align: left;">
234
- <p style="font-size:16px; display: inline; margin: 0;">
235
  <strong>Ovi</strong> – Twin Backbone Cross-Modal Fusion for Audio-Video Generation
236
  </p>
237
  <a href="https://huggingface.co/chetwinlow1/Ovi" style="display: inline-block; vertical-align: middle; margin-left: 0.5em;">
238
  [model]
239
  </a>
240
  </div>
241
- <div style="text-align: left;">
242
  <strong>HF Space by:</strong>
243
  <a href="https://twitter.com/alexandernasa/" style="display: inline-block; vertical-align: middle; margin-left: 0.5em;">
244
  <img src="https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow Me" alt="GitHub Repo">
 
138
  )
139
  return new_img, target_size
140
 
141
+ def get_duration(
142
+ text_prompt,
143
+ image,
144
+ sample_steps,
145
+ video_seed,
146
+ solver_name,
147
+ shif,
148
+ video_guidance_scale,
149
+ audio_guidance_scale,
150
+ slg_layer,
151
+ video_negative_prompt,
152
+ audio_negative_prompt,
153
+ progress,
154
+ ):
155
+ warmup = 20
156
+
157
+ return int(sample_steps * 3 + warmup)
158
+
159
+
160
  @spaces.GPU(duration=160)
161
  def generate_video(
162
  text_prompt,
 
230
  css = """
231
  #col-container {
232
  margin: 0 auto;
233
+ max-width: 1024px;
 
 
 
 
 
 
 
 
234
  }
235
  """
236
 
 
241
  with gr.Column(elem_id="col-container"):
242
  gr.HTML(
243
  """
244
+ <div style="text-align: center;">
245
+ <p style="font-size:26px; display: inline; margin: 0;">
246
  <strong>Ovi</strong> – Twin Backbone Cross-Modal Fusion for Audio-Video Generation
247
  </p>
248
  <a href="https://huggingface.co/chetwinlow1/Ovi" style="display: inline-block; vertical-align: middle; margin-left: 0.5em;">
249
  [model]
250
  </a>
251
  </div>
252
+ <div style="text-align: center;">
253
  <strong>HF Space by:</strong>
254
  <a href="https://twitter.com/alexandernasa/" style="display: inline-block; vertical-align: middle; margin-left: 0.5em;">
255
  <img src="https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow Me" alt="GitHub Repo">