Geek7 commited on
Commit
760c15c
·
verified ·
1 Parent(s): 462b6f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,8 +7,8 @@ from PIL import Image
7
  import gradio as gr # Import Gradio
8
 
9
  # Initialize the Flask app
10
- myapp = Flask(__name__)
11
- CORS(myapp) # Enable CORS for all routes
12
 
13
  # Initialize the InferenceClient with your Hugging Face token
14
  HF_TOKEN = os.environ.get("HF_TOKEN") # Ensure to set your Hugging Face token in the environment
@@ -51,4 +51,4 @@ gr.Interface(
51
 
52
  # Add this block to make sure your app runs when called
53
  if __name__ == "__main__":
54
- myapp.run(host='0.0.0.0', port=7860) # Run directly if needed for testing
 
7
  import gradio as gr # Import Gradio
8
 
9
  # Initialize the Flask app
10
+ app = Flask(__name__)
11
+ CORS(app) # Enable CORS for all routes
12
 
13
  # Initialize the InferenceClient with your Hugging Face token
14
  HF_TOKEN = os.environ.get("HF_TOKEN") # Ensure to set your Hugging Face token in the environment
 
51
 
52
  # Add this block to make sure your app runs when called
53
  if __name__ == "__main__":
54
+ app.run(host='0.0.0.0', port=7860) # Run directly if needed for testing