Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,18 +3,22 @@ from gradio_client import Client
|
|
3 |
import os
|
4 |
import logging
|
5 |
import requests
|
|
|
6 |
|
7 |
webhook_server = os.getenv('webhook_server')
|
8 |
API_TOKEN = os.getenv('ZeroGPU')
|
9 |
BASE_URL = os.getenv('SpaceURL')
|
10 |
|
|
|
|
|
|
|
11 |
# Define your headers including the Authorization with your token
|
12 |
headers = {
|
13 |
"Authorization": f"Bearer {API_TOKEN}"
|
14 |
}
|
15 |
|
16 |
# Initialize the client for image generation "prithivMLmods/IMAGINEO-4K" "mukaist/DALLE-4K"
|
17 |
-
client_image = Client("measmonysuon/DALLE-4K"
|
18 |
|
19 |
# Define resolutions and default style
|
20 |
resolutions = {
|
|
|
3 |
import os
|
4 |
import logging
|
5 |
import requests
|
6 |
+
from huggingface_hub import login
|
7 |
|
8 |
webhook_server = os.getenv('webhook_server')
|
9 |
API_TOKEN = os.getenv('ZeroGPU')
|
10 |
BASE_URL = os.getenv('SpaceURL')
|
11 |
|
12 |
+
# Set your token
|
13 |
+
login(token="API_TOKEN")
|
14 |
+
|
15 |
# Define your headers including the Authorization with your token
|
16 |
headers = {
|
17 |
"Authorization": f"Bearer {API_TOKEN}"
|
18 |
}
|
19 |
|
20 |
# Initialize the client for image generation "prithivMLmods/IMAGINEO-4K" "mukaist/DALLE-4K"
|
21 |
+
client_image = Client("measmonysuon/DALLE-4K")
|
22 |
|
23 |
# Define resolutions and default style
|
24 |
resolutions = {
|