laloadrianmorales commited on
Commit
21ee3f4
·
verified ·
1 Parent(s): 49a0974

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -35
app.py CHANGED
@@ -174,16 +174,7 @@ def generate_video(input_image, num_frames, seed, progress=gr.Progress()):
174
 
175
  # Gradio Interface
176
  def create_interface():
177
- with gr.Blocks(
178
- title="Matrix-Game-2.0",
179
- theme=gr.themes.Soft(),
180
- css="""
181
- .gradio-container {
182
- max-width: 1200px !important;
183
- margin: auto !important;
184
- }
185
- """
186
- ) as interface:
187
 
188
  gr.HTML("""
189
  <div style="text-align: center; padding: 30px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 15px; margin-bottom: 20px;">
@@ -198,8 +189,7 @@ def create_interface():
198
  gr.Markdown("### 📸 Input")
199
  input_image = gr.Image(
200
  label="Input Image",
201
- type="pil",
202
- height=300
203
  )
204
 
205
  gr.Markdown("### ⚙️ Settings")
@@ -219,8 +209,7 @@ def create_interface():
219
 
220
  generate_btn = gr.Button(
221
  "🚀 Generate Video",
222
- variant="primary",
223
- size="lg"
224
  )
225
 
226
  gr.Markdown("""
@@ -233,15 +222,11 @@ def create_interface():
233
 
234
  with gr.Column(scale=1):
235
  gr.Markdown("### 🎬 Generated Video")
236
- output_video = gr.Video(
237
- label="Result",
238
- height=400
239
- )
240
 
241
  status_log = gr.Textbox(
242
  label="Status Log",
243
- lines=8,
244
- max_lines=10
245
  )
246
 
247
  # Event handlers
@@ -250,24 +235,10 @@ def create_interface():
250
  inputs=[input_image, num_frames, seed],
251
  outputs=[output_video, status_log]
252
  )
253
-
254
- # Example inputs
255
- gr.Examples(
256
- examples=[
257
- ["https://images.unsplash.com/photo-1506905925346-21bda4d32df4", 50, 42],
258
- ["https://images.unsplash.com/photo-1441974231531-c6227db76b6e", 75, 123],
259
- ],
260
- inputs=[input_image, num_frames, seed],
261
- label="Example Images"
262
- )
263
 
264
  return interface
265
 
266
  # Launch the app
267
  if __name__ == "__main__":
268
  demo = create_interface()
269
- demo.launch(
270
- server_name="0.0.0.0",
271
- server_port=7860,
272
- share=False
273
- )
 
174
 
175
  # Gradio Interface
176
  def create_interface():
177
+ with gr.Blocks(title="Matrix-Game-2.0") as interface:
 
 
 
 
 
 
 
 
 
178
 
179
  gr.HTML("""
180
  <div style="text-align: center; padding: 30px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border-radius: 15px; margin-bottom: 20px;">
 
189
  gr.Markdown("### 📸 Input")
190
  input_image = gr.Image(
191
  label="Input Image",
192
+ type="pil"
 
193
  )
194
 
195
  gr.Markdown("### ⚙️ Settings")
 
209
 
210
  generate_btn = gr.Button(
211
  "🚀 Generate Video",
212
+ variant="primary"
 
213
  )
214
 
215
  gr.Markdown("""
 
222
 
223
  with gr.Column(scale=1):
224
  gr.Markdown("### 🎬 Generated Video")
225
+ output_video = gr.Video(label="Result")
 
 
 
226
 
227
  status_log = gr.Textbox(
228
  label="Status Log",
229
+ lines=8
 
230
  )
231
 
232
  # Event handlers
 
235
  inputs=[input_image, num_frames, seed],
236
  outputs=[output_video, status_log]
237
  )
 
 
 
 
 
 
 
 
 
 
238
 
239
  return interface
240
 
241
  # Launch the app
242
  if __name__ == "__main__":
243
  demo = create_interface()
244
+ demo.launch()