Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
from gradio import ChatMessage
|
4 |
from typing import Iterator
|
@@ -54,6 +55,29 @@ for split in korean_food_dataset.keys():
|
|
54 |
sub_len = min(MAX_SAMPLES, len(ds_split))
|
55 |
korean_subset[split] = ds_split.select(range(sub_len))
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
def format_chat_history(messages: list) -> list:
|
59 |
"""
|
@@ -152,7 +176,6 @@ def stream_gemini_response(user_message: str, messages: list) -> Iterator[list]:
|
|
152 |
most_similar_data = find_most_similar_data(user_message)
|
153 |
|
154 |
# ์์คํ
๋ฉ์์ง์ ํ๋กฌํํธ ์ค์
|
155 |
-
# ์๋ system_prefix์์ '์์ + ๊ฑด๊ฐ + ๋ฌธํ + ์ญ์ฌ + ์๋ ๋ฅด๊ธฐ + ์์์ + ์นผ๋ก๋ฆฌ + ์ฝ๋ฌผ ๋ณต์ฉ' ๋ฑ ์ข
ํฉ ์๋ด๋ฅผ ๊ฐ์กฐ
|
156 |
system_message = (
|
157 |
"์ ๋ ์๋ก์ด ๋ง๊ณผ ๊ฑด๊ฐ์ ์ํ ํ์ ์ ์กฐ๋ฆฌ๋ฒ์ ์ ์ํ๊ณ , "
|
158 |
"ํ๊ตญ ์์์ ๋น๋กฏํ ๋ค์ํ ๋ ์ํผ ๋ฐ์ดํฐ์ ๊ฑด๊ฐ ์ง์์ ๊ฒฐํฉํ์ฌ "
|
@@ -183,9 +206,18 @@ def stream_gemini_response(user_message: str, messages: list) -> Iterator[list]:
|
|
183 |
"""
|
184 |
|
185 |
if most_similar_data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
prefixed_message = (
|
187 |
f"{system_prefix} {system_message}\n\n"
|
188 |
-
f"[๊ด๋ จ ๋ฐ์ดํฐ]\n{most_similar_data}\n
|
|
|
189 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
190 |
)
|
191 |
else:
|
@@ -271,7 +303,6 @@ def stream_gemini_response(user_message: str, messages: list) -> Iterator[list]:
|
|
271 |
)
|
272 |
yield messages
|
273 |
|
274 |
-
|
275 |
def stream_gemini_response_special(user_message: str, messages: list) -> Iterator[list]:
|
276 |
"""
|
277 |
ํน์ ์ง๋ฌธ(์: ๊ฑด๊ฐ ์๋จ ์ค๊ณ, ๋ง์ถคํ ์๋ฆฌ ๊ฐ๋ฐ ๋ฑ)์ ๋ํ Gemini์ ์๊ฐ๊ณผ ๋ต๋ณ์ ์คํธ๋ฆฌ๋ฐ
|
@@ -309,9 +340,18 @@ def stream_gemini_response_special(user_message: str, messages: list) -> Iterato
|
|
309 |
"""
|
310 |
|
311 |
if most_similar_data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
prefixed_message = (
|
313 |
f"{system_prefix} {system_message}\n\n"
|
314 |
-
f"[๊ด๋ จ ์ ๋ณด]\n{most_similar_data}\n
|
|
|
315 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
316 |
)
|
317 |
else:
|
@@ -435,9 +475,18 @@ def stream_gemini_response_personalized(user_message: str, messages: list) -> It
|
|
435 |
"""
|
436 |
|
437 |
if most_similar_data:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
prefixed_message = (
|
439 |
f"{system_prefix} {system_message}\n\n"
|
440 |
-
f"[๊ด๋ จ ๋ฐ์ดํฐ]\n{most_similar_data}\n
|
|
|
441 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
442 |
)
|
443 |
else:
|
@@ -525,7 +574,6 @@ def user_message(msg: str, history: list) -> tuple[str, list]:
|
|
525 |
########################
|
526 |
# Gradio ์ธํฐ๏ฟฝ๏ฟฝ์ด์ค ๊ตฌ์ฑ
|
527 |
########################
|
528 |
-
|
529 |
with gr.Blocks(
|
530 |
theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral"),
|
531 |
css="""
|
@@ -653,7 +701,7 @@ with gr.Blocks(
|
|
653 |
queue=False
|
654 |
)
|
655 |
|
656 |
-
# 3) ์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ
|
657 |
with gr.TabItem("์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ", id="personalized_cuisine_tab"):
|
658 |
personalized_chatbot = gr.Chatbot(
|
659 |
type="messages",
|
@@ -673,7 +721,6 @@ with gr.Blocks(
|
|
673 |
)
|
674 |
personalized_clear_button = gr.Button("๋ํ ์ด๊ธฐํ", scale=1)
|
675 |
|
676 |
-
# ์์
|
677 |
personalized_example_prompts = [
|
678 |
["์๋ ๋ฅด๊ธฐ๊ฐ (๊ฒฌ๊ณผ๋ฅ, ํด์ฐ๋ฌผ)์ด๊ณ , ํ์ ์ฝ์ ๋ณต์ฉ ์ค์
๋๋ค. ์ ์นผ๋ก๋ฆฌ ์ ์ผ์ ์ถ์ฒ ๋ถํ๋๋ฆฝ๋๋ค."],
|
679 |
["์ ๋น๋ถ๋ด์ฆ์ด ์์ด์ ์ ์ ํ์ ํผํ๊ณ ์ถ๊ณ , ๋จ๋ฐฑ์ง ์ญ์ทจ๊ฐ ์ค์ํฉ๋๋ค. ์๋จ ์กฐํฉ ์ข ์๋ ค์ฃผ์ธ์."],
|
@@ -710,6 +757,59 @@ with gr.Blocks(
|
|
710 |
queue=False
|
711 |
)
|
712 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
# ์ฌ์ฉ ๊ฐ์ด๋ ํญ
|
714 |
with gr.TabItem("์ด์ฉ ๋ฐฉ๋ฒ", id="instructions_tab"):
|
715 |
gr.Markdown(
|
@@ -726,13 +826,15 @@ with gr.Blocks(
|
|
726 |
- **ํ๊ตญ ์์ ํนํ**: ์ ํต ํ์ ๋ ์ํผ ๋ฐ ํ๊ตญ ์์ ๋ฐ์ดํฐ๋ฅผ ํตํด ๋ณด๋ค ํ๋ถํ ์ ์ ๊ฐ๋ฅ.
|
727 |
- **์ค์๊ฐ ์ถ๋ก (Thinking) ํ์**: ๋ต๋ณ ๊ณผ์ ์์ ๋ชจ๋ธ์ด ์๊ฐ์ ์ ๊ฐํ๋ ํ๋ฆ(์คํ์ ๊ธฐ๋ฅ)์ ๋ถ๋ถ์ ์ผ๋ก ํ์ธ.
|
728 |
- **๋ฐ์ดํฐ ๊ฒ์**: ๋ด๋ถ์ ์ผ๋ก ์ ํฉํ ์ ๋ณด๋ฅผ ์ฐพ์ ์ฌ์ฉ์ ์ง๋ฌธ์ ๋ํ ๋ต์ ํ๋ถํ๊ฒ ์ ๊ณต.
|
|
|
729 |
|
730 |
### ์ฌ์ฉ ๋ฐฉ๋ฒ
|
731 |
1. **'์ฐฝ์์ ๋ ์ํผ ๋ฐ ๊ฐ์ด๋' ํญ**: ์ผ๋ฐ์ ์ธ ์๋ฆฌ ์์ด๋์ด๋ ์์ ์ ๋ณด๋ฅผ ๋ฌธ์.
|
732 |
2. **'๋ง์ถคํ ์๋จ/๊ฑด๊ฐ' ํญ**: ํน์ ์งํ, ์ํฉ๋ณ(์คํฌ์ธ , ๋ค์ด์ดํธ ๋ฑ) ์๋จ/๋ ์ํผ ์๋ด.
|
733 |
3. **'์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ' ํญ**: ์๋ ๋ฅด๊ธฐ, ์ฝ๋ฌผ, ๊ฐ์ธ ์นผ๋ก๋ฆฌ ๋ชฉํ ๋ฑ ์ธ๋ถ ์กฐ๊ฑด์ ๊ณ ๋ คํ ์ต์ ์๋จ ์ถ์ฒ.
|
734 |
-
4.
|
735 |
-
5.
|
|
|
736 |
|
737 |
### ์ฐธ๊ณ ์ฌํญ
|
738 |
- **Thinking(์ถ๋ก ) ๊ธฐ๋ฅ**์ ๋ชจ๋ธ ๋ด๋ถ ๊ณผ์ ์ ์ผ๋ถ ๊ณต๊ฐํ์ง๋ง, ์ด๋ ์คํ์ ์ด๋ฉฐ ์ค์ ์๋น์ค์์๋ ๋น๊ณต๊ฐ๋ ์ ์์ต๋๋ค.
|
@@ -743,4 +845,4 @@ with gr.Blocks(
|
|
743 |
|
744 |
# Gradio ์น ์๋น์ค ์คํ
|
745 |
if __name__ == "__main__":
|
746 |
-
demo.launch(debug=True)
|
|
|
1 |
import os
|
2 |
+
import csv
|
3 |
import gradio as gr
|
4 |
from gradio import ChatMessage
|
5 |
from typing import Iterator
|
|
|
55 |
sub_len = min(MAX_SAMPLES, len(ds_split))
|
56 |
korean_subset[split] = ds_split.select(range(sub_len))
|
57 |
|
58 |
+
def find_related_restaurants(query: str, limit: int = 3) -> list:
|
59 |
+
"""
|
60 |
+
Query์ ๊ด๋ จ๋ ๋ฏธ์๋ฆฐ ๋ ์คํ ๋์ find.csv์์ ์ฐพ์ ๋ฐํ
|
61 |
+
"""
|
62 |
+
try:
|
63 |
+
with open('find.csv', 'r', encoding='utf-8') as f:
|
64 |
+
reader = csv.DictReader(f)
|
65 |
+
restaurants = list(reader)
|
66 |
+
|
67 |
+
# ๊ฐ๋จํ ํค์๋ ๋งค์นญ
|
68 |
+
related = []
|
69 |
+
query = query.lower()
|
70 |
+
for restaurant in restaurants:
|
71 |
+
if (query in restaurant.get('Cuisine', '').lower() or
|
72 |
+
query in restaurant.get('Description', '').lower()):
|
73 |
+
related.append(restaurant)
|
74 |
+
if len(related) >= limit:
|
75 |
+
break
|
76 |
+
|
77 |
+
return related
|
78 |
+
except Exception as e:
|
79 |
+
print(f"Error finding restaurants: {e}")
|
80 |
+
return []
|
81 |
|
82 |
def format_chat_history(messages: list) -> list:
|
83 |
"""
|
|
|
176 |
most_similar_data = find_most_similar_data(user_message)
|
177 |
|
178 |
# ์์คํ
๋ฉ์์ง์ ํ๋กฌํํธ ์ค์
|
|
|
179 |
system_message = (
|
180 |
"์ ๋ ์๋ก์ด ๋ง๊ณผ ๊ฑด๊ฐ์ ์ํ ํ์ ์ ์กฐ๋ฆฌ๋ฒ์ ์ ์ํ๊ณ , "
|
181 |
"ํ๊ตญ ์์์ ๋น๋กฏํ ๋ค์ํ ๋ ์ํผ ๋ฐ์ดํฐ์ ๊ฑด๊ฐ ์ง์์ ๊ฒฐํฉํ์ฌ "
|
|
|
206 |
"""
|
207 |
|
208 |
if most_similar_data:
|
209 |
+
# ๊ด๋ จ ๋ ์คํ ๋ ์ฐพ๊ธฐ
|
210 |
+
related_restaurants = find_related_restaurants(user_message)
|
211 |
+
restaurant_text = ""
|
212 |
+
if related_restaurants:
|
213 |
+
restaurant_text = "\n\n[๊ด๋ จ ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ์ถ์ฒ]\n"
|
214 |
+
for rest in related_restaurants:
|
215 |
+
restaurant_text += f"- {rest['Name']} ({rest['Location']}): {rest['Cuisine']}, {rest['Award']}\n"
|
216 |
+
|
217 |
prefixed_message = (
|
218 |
f"{system_prefix} {system_message}\n\n"
|
219 |
+
f"[๊ด๋ จ ๋ฐ์ดํฐ]\n{most_similar_data}\n"
|
220 |
+
f"{restaurant_text}\n"
|
221 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
222 |
)
|
223 |
else:
|
|
|
303 |
)
|
304 |
yield messages
|
305 |
|
|
|
306 |
def stream_gemini_response_special(user_message: str, messages: list) -> Iterator[list]:
|
307 |
"""
|
308 |
ํน์ ์ง๋ฌธ(์: ๊ฑด๊ฐ ์๋จ ์ค๊ณ, ๋ง์ถคํ ์๋ฆฌ ๊ฐ๋ฐ ๋ฑ)์ ๋ํ Gemini์ ์๊ฐ๊ณผ ๋ต๋ณ์ ์คํธ๋ฆฌ๋ฐ
|
|
|
340 |
"""
|
341 |
|
342 |
if most_similar_data:
|
343 |
+
# ๊ด๋ จ ๋ ์คํ ๋ ์ฐพ๊ธฐ
|
344 |
+
related_restaurants = find_related_restaurants(user_message)
|
345 |
+
restaurant_text = ""
|
346 |
+
if related_restaurants:
|
347 |
+
restaurant_text = "\n\n[๊ด๋ จ ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ์ถ์ฒ]\n"
|
348 |
+
for rest in related_restaurants:
|
349 |
+
restaurant_text += f"- {rest['Name']} ({rest['Location']}): {rest['Cuisine']}, {rest['Award']}\n"
|
350 |
+
|
351 |
prefixed_message = (
|
352 |
f"{system_prefix} {system_message}\n\n"
|
353 |
+
f"[๊ด๋ จ ์ ๋ณด]\n{most_similar_data}\n"
|
354 |
+
f"{restaurant_text}\n"
|
355 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
356 |
)
|
357 |
else:
|
|
|
475 |
"""
|
476 |
|
477 |
if most_similar_data:
|
478 |
+
# ๊ด๋ จ ๋ ์คํ ๋ ์ฐพ๊ธฐ
|
479 |
+
related_restaurants = find_related_restaurants(user_message)
|
480 |
+
restaurant_text = ""
|
481 |
+
if related_restaurants:
|
482 |
+
restaurant_text = "\n\n[๊ด๋ จ ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ์ถ์ฒ]\n"
|
483 |
+
for rest in related_restaurants:
|
484 |
+
restaurant_text += f"- {rest['Name']} ({rest['Location']}): {rest['Cuisine']}, {rest['Award']}\n"
|
485 |
+
|
486 |
prefixed_message = (
|
487 |
f"{system_prefix} {system_message}\n\n"
|
488 |
+
f"[๊ด๋ จ ๋ฐ์ดํฐ]\n{most_similar_data}\n"
|
489 |
+
f"{restaurant_text}\n"
|
490 |
f"์ฌ์ฉ์ ์ง๋ฌธ: {user_message}"
|
491 |
)
|
492 |
else:
|
|
|
574 |
########################
|
575 |
# Gradio ์ธํฐ๏ฟฝ๏ฟฝ์ด์ค ๊ตฌ์ฑ
|
576 |
########################
|
|
|
577 |
with gr.Blocks(
|
578 |
theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral"),
|
579 |
css="""
|
|
|
701 |
queue=False
|
702 |
)
|
703 |
|
704 |
+
# 3) ์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ ํญ
|
705 |
with gr.TabItem("์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ", id="personalized_cuisine_tab"):
|
706 |
personalized_chatbot = gr.Chatbot(
|
707 |
type="messages",
|
|
|
721 |
)
|
722 |
personalized_clear_button = gr.Button("๋ํ ์ด๊ธฐํ", scale=1)
|
723 |
|
|
|
724 |
personalized_example_prompts = [
|
725 |
["์๋ ๋ฅด๊ธฐ๊ฐ (๊ฒฌ๊ณผ๋ฅ, ํด์ฐ๋ฌผ)์ด๊ณ , ํ์ ์ฝ์ ๋ณต์ฉ ์ค์
๋๋ค. ์ ์นผ๋ก๋ฆฌ ์ ์ผ์ ์ถ์ฒ ๋ถํ๋๋ฆฝ๋๋ค."],
|
726 |
["์ ๋น๋ถ๋ด์ฆ์ด ์์ด์ ์ ์ ํ์ ํผํ๊ณ ์ถ๊ณ , ๋จ๋ฐฑ์ง ์ญ์ทจ๊ฐ ์ค์ํฉ๋๋ค. ์๋จ ์กฐํฉ ์ข ์๋ ค์ฃผ์ธ์."],
|
|
|
757 |
queue=False
|
758 |
)
|
759 |
|
760 |
+
# 4) ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ํญ
|
761 |
+
with gr.TabItem("MICHELIN Restaurant", id="restaurant_tab"):
|
762 |
+
with gr.Row():
|
763 |
+
search_box = gr.Textbox(
|
764 |
+
label="๋ ์คํ ๋ ๊ฒ์",
|
765 |
+
placeholder="๋ ์คํ ๋ ์ด๋ฆ, ์ฃผ์, ์๋ฆฌ ์ข
๋ฅ ๋ฑ์ผ๋ก ๊ฒ์...",
|
766 |
+
scale=3
|
767 |
+
)
|
768 |
+
cuisine_dropdown = gr.Dropdown(
|
769 |
+
label="์๋ฆฌ ์ข
๋ฅ",
|
770 |
+
choices=["์ ์ฒด"] + sorted(set(r['Cuisine'] for r in find_related_restaurants("", 1000))),
|
771 |
+
value="์ ์ฒด",
|
772 |
+
scale=1
|
773 |
+
)
|
774 |
+
award_dropdown = gr.Dropdown(
|
775 |
+
label="๋ฏธ์๋ฆฐ ๋ฑ๊ธ",
|
776 |
+
choices=["์ ์ฒด"] + sorted(set(r['Award'] for r in find_related_restaurants("", 1000))),
|
777 |
+
value="์ ์ฒด",
|
778 |
+
scale=1
|
779 |
+
)
|
780 |
+
search_button = gr.Button("๊ฒ์", scale=1)
|
781 |
+
|
782 |
+
result_table = gr.Dataframe(
|
783 |
+
headers=["Name", "Address", "Location", "Price", "Cuisine", "Award", "Description"],
|
784 |
+
row_count=10,
|
785 |
+
col_count=(7, "fixed"),
|
786 |
+
overflow_row_behaviour="paginate"
|
787 |
+
)
|
788 |
+
|
789 |
+
def search_restaurants(search_term, cuisine, award):
|
790 |
+
restaurants = find_related_restaurants("", 1000) # ์ ์ฒด ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ
|
791 |
+
|
792 |
+
filtered = []
|
793 |
+
for r in restaurants:
|
794 |
+
if search_term.lower() in r['Name'].lower() or \
|
795 |
+
search_term.lower() in r['Address'].lower() or \
|
796 |
+
search_term.lower() in r['Description'].lower():
|
797 |
+
if (cuisine == "์ ์ฒด" or r['Cuisine'] == cuisine) and \
|
798 |
+
(award == "์ ์ฒด" or r['Award'] == award):
|
799 |
+
filtered.append([
|
800 |
+
r['Name'], r['Address'], r['Location'],
|
801 |
+
r['Price'], r['Cuisine'], r['Award'],
|
802 |
+
r['Description']
|
803 |
+
])
|
804 |
+
|
805 |
+
return filtered
|
806 |
+
|
807 |
+
search_button.click(
|
808 |
+
search_restaurants,
|
809 |
+
inputs=[search_box, cuisine_dropdown, award_dropdown],
|
810 |
+
outputs=result_table
|
811 |
+
)
|
812 |
+
|
813 |
# ์ฌ์ฉ ๊ฐ์ด๋ ํญ
|
814 |
with gr.TabItem("์ด์ฉ ๋ฐฉ๋ฒ", id="instructions_tab"):
|
815 |
gr.Markdown(
|
|
|
826 |
- **ํ๊ตญ ์์ ํนํ**: ์ ํต ํ์ ๋ ์ํผ ๋ฐ ํ๊ตญ ์์ ๋ฐ์ดํฐ๋ฅผ ํตํด ๋ณด๋ค ํ๋ถํ ์ ์ ๊ฐ๋ฅ.
|
827 |
- **์ค์๊ฐ ์ถ๋ก (Thinking) ํ์**: ๋ต๋ณ ๊ณผ์ ์์ ๋ชจ๋ธ์ด ์๊ฐ์ ์ ๊ฐํ๋ ํ๋ฆ(์คํ์ ๊ธฐ๋ฅ)์ ๋ถ๋ถ์ ์ผ๋ก ํ์ธ.
|
828 |
- **๋ฐ์ดํฐ ๊ฒ์**: ๋ด๋ถ์ ์ผ๋ก ์ ํฉํ ์ ๋ณด๋ฅผ ์ฐพ์ ์ฌ์ฉ์ ์ง๋ฌธ์ ๋ํ ๋ต์ ํ๋ถํ๊ฒ ์ ๊ณต.
|
829 |
+
- **๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ๊ฒ์**: ์ ์ธ๊ณ ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ๊ฒ์ ๋ฐ ํํฐ๋ง ๊ธฐ๋ฅ ์ ๊ณต.
|
830 |
|
831 |
### ์ฌ์ฉ ๋ฐฉ๋ฒ
|
832 |
1. **'์ฐฝ์์ ๋ ์ํผ ๋ฐ ๊ฐ์ด๋' ํญ**: ์ผ๋ฐ์ ์ธ ์๋ฆฌ ์์ด๋์ด๋ ์์ ์ ๋ณด๋ฅผ ๋ฌธ์.
|
833 |
2. **'๋ง์ถคํ ์๋จ/๊ฑด๊ฐ' ํญ**: ํน์ ์งํ, ์ํฉ๋ณ(์คํฌ์ธ , ๋ค์ด์ดํธ ๋ฑ) ์๋จ/๋ ์ํผ ์๋ด.
|
834 |
3. **'์ฌ์ฉ์ ๋ง์ถคํ ์์ ์ถ์ฒ' ํญ**: ์๋ ๋ฅด๊ธฐ, ์ฝ๋ฌผ, ๊ฐ์ธ ์นผ๋ก๋ฆฌ ๋ชฉํ ๋ฑ ์ธ๋ถ ์กฐ๊ฑด์ ๊ณ ๋ คํ ์ต์ ์๋จ ์ถ์ฒ.
|
835 |
+
4. **'MICHELIN Restaurant' ํญ**: ๋ฏธ์๋ฆฐ ๋ ์คํ ๋ ๊ฒ์ ๋ฐ ์์ธ ์ ๋ณด ํ์ธ.
|
836 |
+
5. **์์ ์ง๋ฌธ**์ ํด๋ฆญํ๋ฉด ์ฆ์ ์ง๋ฌธ์ผ๋ก ๋ถ๋ฌ์ต๋๋ค.
|
837 |
+
6. ํ์ ์ **๋ํ ์ด๊ธฐํ** ๋ฒํผ์ ๋๋ฌ ์ ๋ํ๋ฅผ ์์ํ์ธ์.
|
838 |
|
839 |
### ์ฐธ๊ณ ์ฌํญ
|
840 |
- **Thinking(์ถ๋ก ) ๊ธฐ๋ฅ**์ ๋ชจ๋ธ ๋ด๋ถ ๊ณผ์ ์ ์ผ๋ถ ๊ณต๊ฐํ์ง๋ง, ์ด๋ ์คํ์ ์ด๋ฉฐ ์ค์ ์๋น์ค์์๋ ๋น๊ณต๊ฐ๋ ์ ์์ต๋๋ค.
|
|
|
845 |
|
846 |
# Gradio ์น ์๋น์ค ์คํ
|
847 |
if __name__ == "__main__":
|
848 |
+
demo.launch(debug=True)
|