Spaces:
Sleeping
Sleeping
updating_prompt
Browse files
app.py
CHANGED
@@ -77,7 +77,12 @@ def normalize_query(user_query):
|
|
77 |
try:
|
78 |
response = client.chat.completions.create(
|
79 |
model="llama-3.1-8b-instant",
|
80 |
-
messages=[
|
|
|
|
|
|
|
|
|
|
|
81 |
"role": "user",
|
82 |
"content": f"""
|
83 |
Please analyze the query: \"{user_query}\", extract Place name, Category, Description, and City.
|
@@ -129,13 +134,13 @@ def generate_response(user_query, top_places, temperature):
|
|
129 |
])
|
130 |
system_prompt = f"""
|
131 |
You are a tour guide assistant. Present the tourism recommendations to the user in Bahasa Indonesia.
|
132 |
-
Only return maximum 5 places that suitable what user wants and provided the data in a clear and concise format. Only return the city that mentioned in \"{user_query}\".
|
133 |
"""
|
134 |
response = client.chat.completions.create(
|
135 |
model="llama-3.1-8b-instant",
|
136 |
messages=[
|
137 |
{"role": "system", "content": system_prompt},
|
138 |
-
{"role": "user", "content": f"Berikut adalah rekomendasi berdasarkan data: {destinations_data}"}
|
139 |
],
|
140 |
temperature=temperature
|
141 |
)
|
@@ -161,12 +166,12 @@ iface = gr.Interface(
|
|
161 |
minimum=0,
|
162 |
maximum=1,
|
163 |
step=0.1,
|
164 |
-
value=0.
|
165 |
label="Temperature"
|
166 |
)
|
167 |
],
|
168 |
outputs="text",
|
169 |
-
title="Tourism Recommendation
|
170 |
description="Masukkan pertanyaan wisata Anda dan dapatkan rekomendasi tempat terbaik!"
|
171 |
)
|
172 |
|
|
|
77 |
try:
|
78 |
response = client.chat.completions.create(
|
79 |
model="llama-3.1-8b-instant",
|
80 |
+
messages=[
|
81 |
+
{
|
82 |
+
"role": "system",
|
83 |
+
"content": "You are a helpful assistant who can suggest where the user wants to go persuasively ."
|
84 |
+
},
|
85 |
+
{
|
86 |
"role": "user",
|
87 |
"content": f"""
|
88 |
Please analyze the query: \"{user_query}\", extract Place name, Category, Description, and City.
|
|
|
134 |
])
|
135 |
system_prompt = f"""
|
136 |
You are a tour guide assistant. Present the tourism recommendations to the user in Bahasa Indonesia.
|
137 |
+
Only return a maximum 5 places that suitable what user wants and provided the data in a clear and concise format. Only return the city that mentioned in \"{user_query}\".
|
138 |
"""
|
139 |
response = client.chat.completions.create(
|
140 |
model="llama-3.1-8b-instant",
|
141 |
messages=[
|
142 |
{"role": "system", "content": system_prompt},
|
143 |
+
{"role": "user", "content": f"Berikut adalah rekomendasi berdasarkan data yang kita miliki: {destinations_data}"}
|
144 |
],
|
145 |
temperature=temperature
|
146 |
)
|
|
|
166 |
minimum=0,
|
167 |
maximum=1,
|
168 |
step=0.1,
|
169 |
+
value=0.6,
|
170 |
label="Temperature"
|
171 |
)
|
172 |
],
|
173 |
outputs="text",
|
174 |
+
title="Tourism Recommendation",
|
175 |
description="Masukkan pertanyaan wisata Anda dan dapatkan rekomendasi tempat terbaik!"
|
176 |
)
|
177 |
|