Mujtaba29 commited on
Commit
3687f30
Β·
verified Β·
1 Parent(s): a809d45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -25,6 +25,8 @@ def get_recycling_suggestions_from_groq(item, quantity):
25
  f"You are an expert in recycling and sustainability. "
26
  f"Suggest profitable and eco-friendly uses for {quantity} kg of {item}, "
27
  f"including household uses, ways to monetize them, and calculate carbon footprint reduction."
 
 
28
  )
29
  chat_completion = client.chat.completions.create(
30
  messages=[{"role": "user", "content": prompt}],
@@ -34,7 +36,7 @@ def get_recycling_suggestions_from_groq(item, quantity):
34
  return chat_completion.choices[0].message.content
35
 
36
  # App title
37
- st.title("♻️ Recycle with Groq LLM 🌍")
38
  st.write("Select clutter items, specify quantities, and get tailored, profitable recycling suggestions along with carbon footprint reduction scores!")
39
 
40
  # Multi-select input for clutter items
@@ -79,15 +81,15 @@ if st.button("Get Recycling Suggestions"):
79
 
80
  # Follow-up Q&A with Groq LLM
81
  st.write("### πŸ€” Have more questions about recycling?")
82
- user_query = st.text_input("Ask the Groq LLM about recycling:")
83
- if st.button("Ask Groq"):
84
  if user_query:
85
  follow_up_response = client.chat.completions.create(
86
  messages=[{"role": "user", "content": user_query}],
87
  model="llama-3.3-70b-versatile",
88
  stream=False,
89
  ).choices[0].message.content
90
- st.write("### 🧠 Groq LLM's Answer:")
91
  st.write(follow_up_response)
92
  else:
93
  st.error("Please enter a question.")
 
25
  f"You are an expert in recycling and sustainability. "
26
  f"Suggest profitable and eco-friendly uses for {quantity} kg of {item}, "
27
  f"including household uses, ways to monetize them, and calculate carbon footprint reduction."
28
+ f"Keep your responce to maximum 5 points."
29
+ f"add emojis in your responce."
30
  )
31
  chat_completion = client.chat.completions.create(
32
  messages=[{"role": "user", "content": prompt}],
 
36
  return chat_completion.choices[0].message.content
37
 
38
  # App title
39
+ st.title("♻️ Recycle-Smart-PK powered by LLM 🌍")
40
  st.write("Select clutter items, specify quantities, and get tailored, profitable recycling suggestions along with carbon footprint reduction scores!")
41
 
42
  # Multi-select input for clutter items
 
81
 
82
  # Follow-up Q&A with Groq LLM
83
  st.write("### πŸ€” Have more questions about recycling?")
84
+ user_query = st.text_input("Ask me about recycling:")
85
+ if st.button("Ask and you will learn"):
86
  if user_query:
87
  follow_up_response = client.chat.completions.create(
88
  messages=[{"role": "user", "content": user_query}],
89
  model="llama-3.3-70b-versatile",
90
  stream=False,
91
  ).choices[0].message.content
92
+ st.write("### 🧠 LLM's Answer: Tailored for you")
93
  st.write(follow_up_response)
94
  else:
95
  st.error("Please enter a question.")