Nikita commited on
Commit
2cef216
·
1 Parent(s): 3a282ff

explicit port and server name for testing

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -29,11 +29,12 @@ app = gr.Interface(
29
  ),
30
  outputs=gr.Text(label="Greeting"),
31
  title="Simple Greeting App",
32
- description="A simple test application built with Python and Gradio. Enter your name to receive a greeting.",
33
- allow_flagging="never" # Disables the "Flag" button for this simple example
34
  )
35
 
36
  # Launch the application
37
- # The launch() method starts a local web server and provides a public URL if share=True.
 
 
38
  if __name__ == "__main__":
39
- app.launch()
 
29
  ),
30
  outputs=gr.Text(label="Greeting"),
31
  title="Simple Greeting App",
32
+ description="A simple test application built with Python and Gradio. Enter your name to receive a greeting."
 
33
  )
34
 
35
  # Launch the application
36
+ # To run in a Docker container (like on Hugging Face Spaces), you must
37
+ # set server_name="0.0.0.0" to listen on all network interfaces.
38
+ # The server_port should match the port exposed in your Dockerfile and readme.md (7860).
39
  if __name__ == "__main__":
40
+ app.launch(server_name="0.0.0.0", server_port=7860)