Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,13 +14,13 @@ api_client = Client("http://211.233.58.202:7960/")
|
|
14 |
|
15 |
# Notion API ์ค์
|
16 |
NOTION_API_KEY = "secret_MpVfJphbfo4599fdczYfMYKNOpyzCcvkhhzk3lgTfVk"
|
17 |
-
NOTION_DATABASE_ID = "
|
18 |
NOTION_API_URL = "https://api.notion.com/v1"
|
19 |
|
20 |
headers = {
|
21 |
"Authorization": f"Bearer {NOTION_API_KEY}",
|
22 |
"Content-Type": "application/json",
|
23 |
-
"Notion-Version": "2022-06-28"
|
24 |
}
|
25 |
|
26 |
def upload_to_notion(prompt, image_url):
|
@@ -71,8 +71,10 @@ def upload_to_notion(prompt, image_url):
|
|
71 |
logging.error(f"Failed to add to Notion: {e}")
|
72 |
logging.error(f"Response content: {response.text}")
|
73 |
logging.error(f"Request payload: {json.dumps(data, indent=2)}")
|
|
|
74 |
raise Exception(f"Failed to add to Notion: {e}")
|
75 |
|
|
|
76 |
def respond(message, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
77 |
logging.info(f"Received message: {message}, seed: {seed}, randomize_seed: {randomize_seed}, "
|
78 |
f"width: {width}, height: {height}, guidance_scale: {guidance_scale}, "
|
|
|
14 |
|
15 |
# Notion API ์ค์
|
16 |
NOTION_API_KEY = "secret_MpVfJphbfo4599fdczYfMYKNOpyzCcvkhhzk3lgTfVk"
|
17 |
+
NOTION_DATABASE_ID = "88c9bdad-cb20-4412-9af7-7d5932e1a82a"
|
18 |
NOTION_API_URL = "https://api.notion.com/v1"
|
19 |
|
20 |
headers = {
|
21 |
"Authorization": f"Bearer {NOTION_API_KEY}",
|
22 |
"Content-Type": "application/json",
|
23 |
+
"Notion-Version": "2022-06-28" # ์ต์ ๋ฒ์ ์ผ๋ก ์
๋ฐ์ดํธ
|
24 |
}
|
25 |
|
26 |
def upload_to_notion(prompt, image_url):
|
|
|
71 |
logging.error(f"Failed to add to Notion: {e}")
|
72 |
logging.error(f"Response content: {response.text}")
|
73 |
logging.error(f"Request payload: {json.dumps(data, indent=2)}")
|
74 |
+
logging.error(f"Headers: {headers}") # API ํค๋ ๋ก๊ทธ์ ๋จ๊ธฐ์ง ์๋๋ก ์ฃผ์ํ์ธ์
|
75 |
raise Exception(f"Failed to add to Notion: {e}")
|
76 |
|
77 |
+
|
78 |
def respond(message, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
79 |
logging.info(f"Received message: {message}, seed: {seed}, randomize_seed: {randomize_seed}, "
|
80 |
f"width: {width}, height: {height}, guidance_scale: {guidance_scale}, "
|