Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ api_client = Client("http://211.233.58.202:7960/")
|
|
16 |
|
17 |
# Notion ํด๋ผ์ด์ธํธ ์ค์
|
18 |
NOTION_TOKEN = os.getenv("NOTION_TOKEN")
|
19 |
-
NOTION_DATABASE_ID = "
|
20 |
notion = NotionClient(auth=NOTION_TOKEN)
|
21 |
|
22 |
def add_to_notion(prompt, image_path):
|
@@ -35,6 +35,7 @@ def add_to_notion(prompt, image_path):
|
|
35 |
logging.error(f"Database ID: {NOTION_DATABASE_ID}")
|
36 |
logging.error(f"Prompt: {prompt}")
|
37 |
logging.error(f"Image path: {image_path}")
|
|
|
38 |
raise
|
39 |
|
40 |
def respond(message, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
@@ -77,16 +78,21 @@ footer {
|
|
77 |
}
|
78 |
"""
|
79 |
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
# ์ด๋ฏธ์ง ์์ฑ์ ์ํ ์์ ํ๋กฌํํธ
|
82 |
examples = [
|
83 |
-
["A glamorous young woman with long, wavy blonde hair and smokey eye makeup, posing in a luxury hotel room. She
|
84 |
["A fit male fitness influencer with short dark hair and stubble, standing shirtless in a modern gym. He has defined abs and arm muscles, and is holding a protein shake in one hand and a card that says 'openfree.ai' in the other. Bright, clean lighting highlights his physique.", "q2.webp"],
|
85 |
-
["A bohemian-style female travel blogger with sun-kissed skin and messy beach waves, sitting on a tropical beach at sunset. She
|
86 |
-
["A trendy male fashion influencer with perfectly styled hair and designer stubble, posing on a city street. He
|
87 |
-
["A fresh-faced young female beauty guru with freckles and natural makeup, sitting at a vanity covered in cosmetics. She
|
88 |
-
["A stylish young woman with long, wavy ombre hair and winged eyeliner, posing in front of a neon-lit city skyline at night. She
|
89 |
-
["Create a surreal advertisement poster for a fictional time travel agency. The background should depict a swirling vortex of clock faces and historical landmarks from different eras. In the foreground, place large, bold text that reads
|
90 |
["Photo realistic scene inspired by LOTR: [A tiny red dragon sleeps curled up in a nest on a medieval wizard's table]. Shot with a macro lens (f/2.8, 50mm) and a Canon EOSR5, the soft focus captures [the cozy morning light filtering through a near by window]. The pastel colors and whimsical steam shapes enhance the serene atmosphere, evoking a DnD RPG setting. The image is rendered in 16K and 8K, highlighting [the intricate details and medieval charm].", "q8.webp"],
|
91 |
["์ฌ๊ธ๋ผ์ค๋ฅผ ์ฐฉ์ฉํ ๊ท์ฌ์ด ๊ฐ์์ง๊ฐ 'Openfree.ai'๋ผ๊ณ ์ฐ์ฌ์ง ํ์งํ์ ๋ค๊ณ ์๋ค.", "q9.webp"],
|
92 |
["๋ฏธ๋ ์ ์ธ ๋์์ ํด์ง๋ ํ๊ฒฝ", "q10.webp"],
|
@@ -102,7 +108,6 @@ examples = [
|
|
102 |
["A fantasy map of a fictional world, with detailed terrain and cities.", "q19.webp"]
|
103 |
]
|
104 |
|
105 |
-
|
106 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
107 |
with gr.Row():
|
108 |
input_text = gr.Textbox(label="Enter your prompt for image generation")
|
|
|
16 |
|
17 |
# Notion ํด๋ผ์ด์ธํธ ์ค์
|
18 |
NOTION_TOKEN = os.getenv("NOTION_TOKEN")
|
19 |
+
NOTION_DATABASE_ID = "88c9bdad-cb20-4412-9af7-7d5932e1a82a"
|
20 |
notion = NotionClient(auth=NOTION_TOKEN)
|
21 |
|
22 |
def add_to_notion(prompt, image_path):
|
|
|
35 |
logging.error(f"Database ID: {NOTION_DATABASE_ID}")
|
36 |
logging.error(f"Prompt: {prompt}")
|
37 |
logging.error(f"Image path: {image_path}")
|
38 |
+
logging.error("Please make sure the Notion integration has access to the database and the database ID is correct.")
|
39 |
raise
|
40 |
|
41 |
def respond(message, seed, randomize_seed, width, height, guidance_scale, num_inference_steps):
|
|
|
78 |
}
|
79 |
"""
|
80 |
|
81 |
+
css = """
|
82 |
+
footer {
|
83 |
+
visibility: hidden;
|
84 |
+
}
|
85 |
+
"""
|
86 |
|
87 |
# ์ด๋ฏธ์ง ์์ฑ์ ์ํ ์์ ํ๋กฌํํธ
|
88 |
examples = [
|
89 |
+
["A glamorous young woman with long, wavy blonde hair and smokey eye makeup, posing in a luxury hotel room. She's wearing a sparkly gold cocktail dress and holding up a white card with 'openfree.ai' written on it in elegant calligraphy. Soft, warm lighting creates a luxurious atmosphere. ", "q1.webp"],
|
90 |
["A fit male fitness influencer with short dark hair and stubble, standing shirtless in a modern gym. He has defined abs and arm muscles, and is holding a protein shake in one hand and a card that says 'openfree.ai' in the other. Bright, clean lighting highlights his physique.", "q2.webp"],
|
91 |
+
["A bohemian-style female travel blogger with sun-kissed skin and messy beach waves, sitting on a tropical beach at sunset. She's wearing a flowy white sundress and holding up a weathered postcard with 'openfree.ai' scrawled on it. Golden hour lighting bathes the scene in warm tones. ", "q3.webp"],
|
92 |
+
["A trendy male fashion influencer with perfectly styled hair and designer stubble, posing on a city street. He's wearing a tailored suit and holding up a sleek black business card with 'openfree.ai' printed in minimalist white font. The background shows blurred city lights, creating a chic urban atmosphere.", "q4.webp"],
|
93 |
+
["A fresh-faced young female beauty guru with freckles and natural makeup, sitting at a vanity covered in cosmetics. She's wearing a pastel pink robe and holding up a makeup palette with 'openfree.ai' written on it in lipstick. Soft, flattering lighting enhances her radiant complexion. ", "q5.webp"],
|
94 |
+
["A stylish young woman with long, wavy ombre hair and winged eyeliner, posing in front of a neon-lit city skyline at night. She's wearing a sleek black leather jacket over a sparkly crop top and holding up a holographic business card that says 'openfree.ai' in futuristic font. The card reflects the colorful neon lights, creating a cyberpunk aesthetic.", "q6.webp"],
|
95 |
+
["Create a surreal advertisement poster for a fictional time travel agency. The background should depict a swirling vortex of clock faces and historical landmarks from different eras. In the foreground, place large, bold text that reads "AI TOURS: YOUR PAST IS OUR FUTURE" in a retro-futuristic font. The text should appear to be partially disintegrating into particles that are being sucked into the time vortex. Include smaller text at the bottom with fictional pricing and the slogan "History is just a ticket away!"", "q7.webp"],
|
96 |
["Photo realistic scene inspired by LOTR: [A tiny red dragon sleeps curled up in a nest on a medieval wizard's table]. Shot with a macro lens (f/2.8, 50mm) and a Canon EOSR5, the soft focus captures [the cozy morning light filtering through a near by window]. The pastel colors and whimsical steam shapes enhance the serene atmosphere, evoking a DnD RPG setting. The image is rendered in 16K and 8K, highlighting [the intricate details and medieval charm].", "q8.webp"],
|
97 |
["์ฌ๊ธ๋ผ์ค๋ฅผ ์ฐฉ์ฉํ ๊ท์ฌ์ด ๊ฐ์์ง๊ฐ 'Openfree.ai'๋ผ๊ณ ์ฐ์ฌ์ง ํ์งํ์ ๋ค๊ณ ์๋ค.", "q9.webp"],
|
98 |
["๋ฏธ๋ ์ ์ธ ๋์์ ํด์ง๋ ํ๊ฒฝ", "q10.webp"],
|
|
|
108 |
["A fantasy map of a fictional world, with detailed terrain and cities.", "q19.webp"]
|
109 |
]
|
110 |
|
|
|
111 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css) as demo:
|
112 |
with gr.Row():
|
113 |
input_text = gr.Textbox(label="Enter your prompt for image generation")
|