linoyts HF Staff commited on
Commit
2eea82e
·
verified ·
1 Parent(s): 2ca531e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -4
app.py CHANGED
@@ -25,13 +25,37 @@ def generate(prompt,
25
  return
26
 
27
 
28
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  gr.Markdown("# LTX Video 0.9.7 Distilled")
31
 
32
- prompt = gr.Textbox(label="prompt")
33
- output = gr.Video(interactive=False)
34
- run_button = gr.Button()
 
 
 
 
 
 
35
 
36
  with gr.Accordion("Advanced settings", open=False):
37
  n_prompt = gr.Textbox(label="negative prompt", value="", visible=False)
 
25
  return
26
 
27
 
28
+ css="""
29
+ #col-container {
30
+ margin: 0 auto;
31
+ max-width: 900px;
32
+ }
33
+ """
34
+
35
+ js_func = """
36
+ function refresh() {
37
+ const url = new URL(window.location);
38
+
39
+ if (url.searchParams.get('__theme') !== 'dark') {
40
+ url.searchParams.set('__theme', 'dark');
41
+ window.location.href = url.href;
42
+ }
43
+ }
44
+ """
45
+
46
+ with gr.Blocks(css=css, theme=gr.themes.Ocean(), js=js_func) as demo:
47
 
48
  gr.Markdown("# LTX Video 0.9.7 Distilled")
49
 
50
+ with gr.Row():
51
+ with gr.Column():
52
+ with gr.Group():
53
+ image = gr.Image(label="")
54
+ prompt = gr.Textbox(label="prompt")
55
+ run_button = gr.Button()
56
+ with gr.Column():
57
+ output = gr.Video(interactive=False)
58
+
59
 
60
  with gr.Accordion("Advanced settings", open=False):
61
  n_prompt = gr.Textbox(label="negative prompt", value="", visible=False)