Rooni commited on
Commit
b2dc0dc
·
verified ·
1 Parent(s): 16c8f1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -75,13 +75,12 @@ def process_image(
75
  os.remove(image_path)
76
 
77
  return gr.update(value=generated_image_url), result[1]
78
- # UI CSS
79
- css = """
80
- #col-container {
81
- margin: 0 auto;
82
- max-width: 960px;
83
- }
84
- """
85
 
86
  # Create the Gradio interface
87
  with gr.Blocks(css=css) as demo:
@@ -154,4 +153,4 @@ with gr.Blocks(css=css) as demo:
154
  )
155
 
156
  if __name__ == "__main__":
157
- demo.launch()
 
75
  os.remove(image_path)
76
 
77
  return gr.update(value=generated_image_url), result[1]
78
+ # Ссылка на файл CSS
79
+ css_url = "https://neurixyufi-aihub.static.hf.space/style.css"
80
+
81
+ # Получение CSS по ссылке
82
+ response = requests.get(css_url)
83
+ css = response.text + " .gradio-container{max-width: 700px !important} h1{text-align:center} #component-4 { height: 70vh !important; } #col-container { margin: 0 auto; max-width: 960px; }"
 
84
 
85
  # Create the Gradio interface
86
  with gr.Blocks(css=css) as demo:
 
153
  )
154
 
155
  if __name__ == "__main__":
156
+ demo.queue(max_size=250).launch(show_api=False, share=False)