Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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")
|
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 |
-
|
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)
|
|
|
|
|
|