Badger123t commited on
Commit
61fc32f
·
verified ·
1 Parent(s): 62837a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -34,7 +34,7 @@ examples = [
34
  "an anime illustration of a wiener schnitzel",
35
  ]
36
 
37
- css="""
38
  #col-container {
39
  margin: 0 auto;
40
  max-width: 520px;
@@ -44,7 +44,7 @@ css="""
44
  with gr.Blocks(css=css) as demo:
45
 
46
  with gr.Column(elem_id="col-container"):
47
- gr.Markdown(f"""# FLUX.1
48
  blackforestlabs.ai
49
  """)
50
 
@@ -72,7 +72,7 @@ blackforestlabs.ai
72
  value=0,
73
  )
74
 
75
- randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
76
 
77
  with gr.Row():
78
 
@@ -93,8 +93,6 @@ blackforestlabs.ai
93
  )
94
 
95
  with gr.Row():
96
-
97
-
98
  num_inference_steps = gr.Slider(
99
  label="Number of inference steps",
100
  minimum=1,
@@ -104,18 +102,19 @@ blackforestlabs.ai
104
  )
105
 
106
  gr.Examples(
107
- examples = examples,
108
- fn = infer,
109
- inputs = [prompt],
110
- outputs = [result, seed],
111
  cache_examples="lazy"
112
  )
113
 
114
  gr.on(
115
  triggers=[run_button.click, prompt.submit],
116
- fn = infer,
117
- inputs = [prompt, seed, randomize_seed, width, height, num_inference_steps],
118
- outputs = [result, seed]
119
  )
120
 
121
- demo.launch(share=True)
 
 
34
  "an anime illustration of a wiener schnitzel",
35
  ]
36
 
37
+ css = """
38
  #col-container {
39
  margin: 0 auto;
40
  max-width: 520px;
 
44
  with gr.Blocks(css=css) as demo:
45
 
46
  with gr.Column(elem_id="col-container"):
47
+ gr.Markdown("""# FLUX.1
48
  blackforestlabs.ai
49
  """)
50
 
 
72
  value=0,
73
  )
74
 
75
+ randomize_seed = gr.Checkbox(label="Randomise seed", value=True)
76
 
77
  with gr.Row():
78
 
 
93
  )
94
 
95
  with gr.Row():
 
 
96
  num_inference_steps = gr.Slider(
97
  label="Number of inference steps",
98
  minimum=1,
 
102
  )
103
 
104
  gr.Examples(
105
+ examples=examples,
106
+ fn=infer,
107
+ inputs=[prompt],
108
+ outputs=[result, seed],
109
  cache_examples="lazy"
110
  )
111
 
112
  gr.on(
113
  triggers=[run_button.click, prompt.submit],
114
+ fn=infer,
115
+ inputs=[prompt, seed, randomize_seed, width, height, num_inference_steps],
116
+ outputs=[result, seed]
117
  )
118
 
119
+ # Launch the app with remote access enabled
120
+ demo.launch(share=True, server_name="0.0.0.0")