Spaces:
Runtime error
Runtime error
shigeru saito
commited on
Commit
·
13cce5c
1
Parent(s):
3d9d048
template.mdから取得するように修正
Browse files- app.py +12 -11
- template.md +12 -12
app.py
CHANGED
@@ -152,18 +152,19 @@ class NajiminoAI:
|
|
152 |
|
153 |
def format_recipe(self, lang, title, description, ingredients, instruction, comment_feelings_taste, explanation_to_blind_person, prompt_for_visual_expression_in_en):
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
165 |
|
166 |
-
print(debug_message)
|
167 |
|
168 |
return debug_message
|
169 |
|
|
|
152 |
|
153 |
def format_recipe(self, lang, title, description, ingredients, instruction, comment_feelings_taste, explanation_to_blind_person, prompt_for_visual_expression_in_en):
|
154 |
|
155 |
+
template = get_filetext(filename = "template.md")
|
156 |
+
debug_message = template.format(
|
157 |
+
lang=lang,
|
158 |
+
title=title,
|
159 |
+
description=description,
|
160 |
+
ingredients=ingredients,
|
161 |
+
instruction=instruction,
|
162 |
+
comment_feelings_taste=comment_feelings_taste,
|
163 |
+
explanation_to_blind_person=explanation_to_blind_person,
|
164 |
+
prompt_for_visual_expression_in_en=prompt_for_visual_expression_in_en
|
165 |
+
)
|
166 |
|
167 |
+
print("debug_message: "+debug_message)
|
168 |
|
169 |
return debug_message
|
170 |
|
template.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
|
|
1 |
+
# レシピ: {title}
|
2 |
|
3 |
+
{description}
|
4 |
|
5 |
+
## 材料
|
6 |
|
7 |
+
{ingredients}
|
8 |
|
9 |
+
## 作り方
|
10 |
|
11 |
+
{instruction}
|
12 |
|
13 |
+
## このレシピの感想と味について
|
14 |
|
15 |
+
{comment_feelings_taste}
|
16 |
|
17 |
+
## 目の不自由な方への説明
|
18 |
|
19 |
+
{explanation_to_blind_person}
|
20 |
|
21 |
+
## 画像生成プロンプト
|
22 |
|
23 |
+
{prompt_for_visual_expression_in_en}
|