akhaliq HF Staff commited on
Commit
f561a3b
·
verified ·
1 Parent(s): 57b6572

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -4
app.py CHANGED
@@ -30,14 +30,17 @@ def create_ui():
30
  show_download_button=True
31
  )
32
 
33
- # Set up the event listener
34
  generate_btn.click(
35
  fn=generate_image,
36
  inputs=[prompt_input],
37
  outputs=[output_image],
 
 
 
38
  )
39
 
40
- # Example usage guidance - only the Fox example is kept
41
  gr.Examples(
42
  examples=[
43
  "A detailed watercolor painting of a small red fox sleeping on a pile of autumn leaves."
@@ -45,11 +48,18 @@ def create_ui():
45
  inputs=prompt_input,
46
  outputs=output_image,
47
  fn=generate_image,
48
- cache_examples=False,
 
 
49
  )
50
 
51
  return demo
52
 
53
  if __name__ == "__main__":
54
  app = create_ui()
55
- app.launch()
 
 
 
 
 
 
30
  show_download_button=True
31
  )
32
 
33
+ # Set up the event listener with all queue-related features disabled
34
  generate_btn.click(
35
  fn=generate_image,
36
  inputs=[prompt_input],
37
  outputs=[output_image],
38
+ queue=False, # Disable queue for this event
39
+ api_name=False, # Disable API endpoint creation
40
+ show_api=False, # Don't show this in API docs
41
  )
42
 
43
+ # Example usage guidance with queue features disabled
44
  gr.Examples(
45
  examples=[
46
  "A detailed watercolor painting of a small red fox sleeping on a pile of autumn leaves."
 
48
  inputs=prompt_input,
49
  outputs=output_image,
50
  fn=generate_image,
51
+ cache_examples=False, # Don't cache examples
52
+ api_name=False, # No API endpoint for examples
53
+ show_api=False, # Don't show in API docs
54
  )
55
 
56
  return demo
57
 
58
  if __name__ == "__main__":
59
  app = create_ui()
60
+ # Launch without queue, API, and monitoring features
61
+ app.launch(
62
+ show_api=False, # Hide API documentation
63
+ enable_monitoring=False, # Disable monitoring to prevent any background queuing
64
+ quiet=True, # Reduce console output
65
+ )