SHAMIL SHAHBAZ AWAN commited on
Update app.py
Browse files19 unmodified lines202122232425267 unmodified lines34353637383930 unmodified lines70717273747576777819 unmodified lines"""Use Tavily API to fetch real-time suggestions based on location and need."""query = f"Provide affordable internet providers or satellite internet services for rural areas near {location}, especially for low-income families."try:# Execute the query using TavilyClient7 unmodified lines"""Use the Groq model to enhance and organize the suggestions."""groq_client = Groq(api_key=GROQ_API_KEY)try:30 unmodified linesst.write("Raw Suggestions from Tavily:")st.write(tavily_suggestions)# Enhance the response using Groqenhanced_suggestions = enhance_with_groq(tavily_suggestions)st.subheader("Enhanced Suggestions:")st.write(enhanced_suggestions)else:st.warning("Please enter your location to get recommendations.")19 unmodified lines202122232425267 unmodified lines34353637383940414230 unmodified lines7374757677787980818283848519 unmodified lines"""Use Tavily API to fetch real-time suggestions based on location and need."""query = f"Provide internet connectivity options for rural areas near {location}, especially affordable providers."try:# Execute the query using TavilyClient7 unmodified lines"""Use the Groq model to enhance and organize the suggestions."""if suggestions == "No suggestions available.":return "It seems like we couldn't find any suggestions. Try asking in a different way or checking with local ISPs."groq_client = Groq(api_key=GROQ_API_KEY)try:30 unmodified linesst.write("Raw Suggestions from Tavily:")st.write(tavily_suggestions)# Check if the response is empty before passing to Groqif tavily_suggestions != "No suggestions available.":# Enhance the response using Groqenhanced_suggestions = enhance_with_groq(tavily_suggestions)st.subheader("Enhanced Suggestions:")st.write(enhanced_suggestions)else:st.warning("No suggestions available. Try refining your query.")else:st.warning("Please enter your location to get recommendations.")
app.py+12-5