MrDonStuff commited on
Commit
e66c7c5
·
verified ·
1 Parent(s): 5065d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -11,7 +11,7 @@ import re
11
  app = Flask(__name__)
12
 
13
  API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
14
- API_TOKEN = os.getenv("HF_READ_TOKEN") # it is free
15
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
16
 
17
  TEMP_DIR = "temp"
@@ -79,7 +79,4 @@ def show_image(filename):
79
  return send_from_directory(TEMP_DIR, filename)
80
 
81
  if __name__ == "__main__":
82
- if not os.path.exists(TEMP_DIR):
83
- os.makedirs(TEMP_DIR)
84
-
85
- app.run(debug=True, host="0.0.0.0", port=7860)
 
11
  app = Flask(__name__)
12
 
13
  API_URL = "https://api-inference.huggingface.co/models/openskyml/dalle-3-xl"
14
+ API_TOKEN = os.getenv("HF_READ_TOKEN") # Ensure this token is for a plan without GPU access
15
  headers = {"Authorization": f"Bearer {API_TOKEN}"}
16
 
17
  TEMP_DIR = "temp"
 
79
  return send_from_directory(TEMP_DIR, filename)
80
 
81
  if __name__ == "__main__":
82
+ app.run(host='0.0.0.0', port=8080)