linoyts HF Staff commited on
Commit
cda033e
·
verified ·
1 Parent(s): c833e98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -41,7 +41,7 @@ def handle_json(text):
41
  return "Error"
42
 
43
 
44
- @spaces.GPU()
45
  def infer(prompt,
46
  negative_prompt="",
47
  seed=42,
@@ -77,7 +77,7 @@ def infer(prompt,
77
  css = """
78
  #col-container{
79
  margin: 0 auto;
80
- max-width: 750px;
81
  }
82
  """
83
  with gr.Blocks(css=css) as demo:
@@ -89,8 +89,10 @@ with gr.Blocks(css=css) as demo:
89
  with gr.Row():
90
  prompt_in = gr.Textbox(label="Prompt")
91
  prompt_in_json = gr.JSON(label="Json")
92
-
93
- with gr.Accordion("Advanced Settings", open=False):
 
 
94
  with gr.Row():
95
  seed = gr.Slider(
96
  label="Seed",
@@ -135,11 +137,6 @@ with gr.Blocks(css=css) as demo:
135
  with gr.Row():
136
  negative_prompt = gr.Textbox(label="negative prompt", value=json.dumps(''))
137
  negative_prompt_json = gr.JSON(label="json negative prompt", value=json.dumps(''))
138
-
139
-
140
-
141
- submit_btn = gr.Button("Generate")
142
- result = gr.Image(label="output")
143
 
144
  # prompt_in.change(
145
  # handle_json,
 
41
  return "Error"
42
 
43
 
44
+ @spaces.GPU(duration=100)
45
  def infer(prompt,
46
  negative_prompt="",
47
  seed=42,
 
77
  css = """
78
  #col-container{
79
  margin: 0 auto;
80
+ max-width: 768px;
81
  }
82
  """
83
  with gr.Blocks(css=css) as demo:
 
89
  with gr.Row():
90
  prompt_in = gr.Textbox(label="Prompt")
91
  prompt_in_json = gr.JSON(label="Json")
92
+
93
+ submit_btn = gr.Button("Generate")
94
+ result = gr.Image(label="output")
95
+ with gr.Accordion("Advanced Settings", open=False):
96
  with gr.Row():
97
  seed = gr.Slider(
98
  label="Seed",
 
137
  with gr.Row():
138
  negative_prompt = gr.Textbox(label="negative prompt", value=json.dumps(''))
139
  negative_prompt_json = gr.JSON(label="json negative prompt", value=json.dumps(''))
 
 
 
 
 
140
 
141
  # prompt_in.change(
142
  # handle_json,