Spaces:
Running
Running
clear previous data
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import random
|
|
7 |
|
8 |
|
9 |
random_number = random.randint(3000, 10000)
|
10 |
-
|
11 |
model = GroqModel('llama-3.1-70b-versatile', api_key='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')
|
12 |
|
13 |
|
@@ -25,6 +25,7 @@ async def onClick(vacationType,familyType,duration,purpose,interests):
|
|
25 |
result_1 = agent.run_sync(user_prompt="for space travel which planet is the best")
|
26 |
result = result_1
|
27 |
st.caption(result.data)
|
|
|
28 |
|
29 |
|
30 |
def asyncOnClick(vacationType,familyType,duration,purpose,interests):
|
@@ -49,13 +50,19 @@ async def main():
|
|
49 |
vacationType = st.selectbox(label="Travel Style",options=("Budget","Mid-budget","High-end"))
|
50 |
family = st.selectbox(label="Group Size",options=("Solo","Small family","Large family","Destination weeding"))
|
51 |
duration = st.selectbox(label="Duration of Trip",options=("5 days","2 weeks","1 month","more then 1 month"))
|
52 |
-
purpose = st.selectbox(label="Purpose of Travel",options=("Honeymoon","anniversary","family vacation","corporate retreat"))
|
53 |
interests = st.selectbox(label="Special Interestl",options=("Photography","gastronomy","wildlife","art"))
|
54 |
|
55 |
|
56 |
|
57 |
if st.button("Search"):
|
58 |
asyncOnClick(vacationType,family,duration,purpose,interests)
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
if __name__ == '__main__':
|
61 |
import asyncio
|
|
|
7 |
|
8 |
|
9 |
random_number = random.randint(3000, 10000)
|
10 |
+
|
11 |
model = GroqModel('llama-3.1-70b-versatile', api_key='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')
|
12 |
|
13 |
|
|
|
25 |
result_1 = agent.run_sync(user_prompt="for space travel which planet is the best")
|
26 |
result = result_1
|
27 |
st.caption(result.data)
|
28 |
+
print(result_1)
|
29 |
|
30 |
|
31 |
def asyncOnClick(vacationType,familyType,duration,purpose,interests):
|
|
|
50 |
vacationType = st.selectbox(label="Travel Style",options=("Budget","Mid-budget","High-end"))
|
51 |
family = st.selectbox(label="Group Size",options=("Solo","Small family","Large family","Destination weeding"))
|
52 |
duration = st.selectbox(label="Duration of Trip",options=("5 days","2 weeks","1 month","more then 1 month"))
|
53 |
+
purpose = st.selectbox(label="Purpose of Travel",options=("Honeymoon","anniversary","family vacation","corporate retreat","vacation"))
|
54 |
interests = st.selectbox(label="Special Interestl",options=("Photography","gastronomy","wildlife","art"))
|
55 |
|
56 |
|
57 |
|
58 |
if st.button("Search"):
|
59 |
asyncOnClick(vacationType,family,duration,purpose,interests)
|
60 |
+
vacationType = ""
|
61 |
+
family = ""
|
62 |
+
duration = ""
|
63 |
+
purpose = ""
|
64 |
+
interests = ""
|
65 |
+
|
66 |
|
67 |
if __name__ == '__main__':
|
68 |
import asyncio
|