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

removed app variable

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -20,7 +20,13 @@ def greet(name):
20
  # - outputs: The component(s) to display the result. Here we use a simple Text component.
21
  # - title: The title that appears at the top of the UI.
22
  # - description: A brief description of what the app does.
23
- app = gr.Interface(
 
 
 
 
 
 
24
  fn=greet,
25
  inputs=gr.Textbox(
26
  lines=1,
@@ -30,11 +36,4 @@ app = gr.Interface(
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)
 
20
  # - outputs: The component(s) to display the result. Here we use a simple Text component.
21
  # - title: The title that appears at the top of the UI.
22
  # - description: A brief description of what the app does.
23
+
24
+ # Launch the application
25
+ # To run in a Docker container (like on Hugging Face Spaces), you must
26
+ # set server_name="0.0.0.0" to listen on all network interfaces.
27
+ # The server_port should match the port exposed in your Dockerfile and readme.md (7860).
28
+ if __name__ == "__main__":
29
+ gr.Interface(
30
  fn=greet,
31
  inputs=gr.Textbox(
32
  lines=1,
 
36
  outputs=gr.Text(label="Greeting"),
37
  title="Simple Greeting App",
38
  description="A simple test application built with Python and Gradio. Enter your name to receive a greeting."
39
+ ).launch(server_name="0.0.0.0", server_port=7860)