baxin commited on
Commit
80218be
·
1 Parent(s): c391eb7

move icon as display_icon

Browse files
Files changed (2) hide show
  1. app.py +1 -9
  2. utils.py +7 -0
app.py CHANGED
@@ -25,16 +25,8 @@ load_dotenv()
25
  # --- Streamlit ページ設定 ---
26
  st.set_page_config(page_icon="🤖", layout="wide", page_title="Recipe Infographic Prompt Generator")
27
 
28
- def icon(emoji: str):
29
- st.write(
30
- f'<span style="font-size: 78px; line-height: 1">{emoji}</span>',
31
- unsafe_allow_html=True,
32
- )
33
-
34
-
35
-
36
  # --- UI 表示 ---
37
- icon("🧠 x 🧑‍🍳")
38
  st.title("Recipe Infographic Prompt Generator")
39
  st.subheader("Simply enter a dish name or recipe to easily generate image prompts for stunning recipe infographics", divider="orange", anchor=False)
40
 
 
25
  # --- Streamlit ページ設定 ---
26
  st.set_page_config(page_icon="🤖", layout="wide", page_title="Recipe Infographic Prompt Generator")
27
 
 
 
 
 
 
 
 
 
28
  # --- UI 表示 ---
29
+ utils.display_icon("🧠 x 🧑‍🍳")
30
  st.title("Recipe Infographic Prompt Generator")
31
  st.subheader("Simply enter a dish name or recipe to easily generate image prompts for stunning recipe infographics", divider="orange", anchor=False)
32
 
utils.py CHANGED
@@ -35,3 +35,10 @@ def generate_image_from_prompt(_together_client, prompt_text):
35
  except Exception as e:
36
  st.error(f"Image generation error: {e}", icon="🚨")
37
  return None
 
 
 
 
 
 
 
 
35
  except Exception as e:
36
  st.error(f"Image generation error: {e}", icon="🚨")
37
  return None
38
+
39
+
40
+ def display_icon(emoji: str):
41
+ st.write(
42
+ f'<span style="font-size: 78px; line-height: 1">{emoji}</span>',
43
+ unsafe_allow_html=True,
44
+ )