Rooni commited on
Commit
9cb2b2f
·
1 Parent(s): 0aaeb17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -53,17 +53,22 @@ def improve_quality(image, algorithm):
53
 
54
  # Основная функция
55
  def main():
56
- gr.Interface(
57
  generate_image,
58
  inputs=[prompt, models, negative_prompt, sampling_method, sampling_steps, cfg_scale, seed],
59
  outputs=gr.Image(),
60
  title="Gradio Image Generator",
61
- tabs=[
 
 
 
 
62
  gr.Tab("Базовые настройки", [prompt, models]),
63
  gr.Tab("Расширенные настройки", [negative_prompt, sampling_method, sampling_steps, cfg_scale, seed]),
64
  gr.Tab("Улучшение качества", [algorithm]),
65
- ],
66
- ).launch()
 
67
 
68
  if __name__ == "__main__":
69
  main()
 
53
 
54
  # Основная функция
55
  def main():
56
+ interface = gr.Interface(
57
  generate_image,
58
  inputs=[prompt, models, negative_prompt, sampling_method, sampling_steps, cfg_scale, seed],
59
  outputs=gr.Image(),
60
  title="Gradio Image Generator",
61
+ )
62
+
63
+ # Add tabs (if supported)
64
+ if hasattr(interface, 'tabs'):
65
+ interface.tabs([
66
  gr.Tab("Базовые настройки", [prompt, models]),
67
  gr.Tab("Расширенные настройки", [negative_prompt, sampling_method, sampling_steps, cfg_scale, seed]),
68
  gr.Tab("Улучшение качества", [algorithm]),
69
+ ])
70
+
71
+ interface.launch()
72
 
73
  if __name__ == "__main__":
74
  main()