Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -103,12 +103,12 @@ if user_query:
|
|
103 |
with st.spinner("Scraping website..."):
|
104 |
website = get_all_details(url)
|
105 |
|
106 |
-
|
107 |
st.success("Website loaded successfully!")
|
108 |
# st.write(f"**Website Title:** {website.title}")
|
109 |
|
110 |
-
else:
|
111 |
-
|
112 |
|
113 |
|
114 |
# Call Groq API for processing
|
@@ -118,7 +118,7 @@ if user_query:
|
|
118 |
chat_streaming = client.chat.completions.create(
|
119 |
messages=[
|
120 |
{"role": "system", "content": "You are a helpful assistant specializing in extracting and analyzing website content. Answer questions based on the provided website's content. Ensure responses are clear, concise, and formatted in Markdown for better readability. use your knowledge to add relevant inforation to thr users query"},
|
121 |
-
{"role": "user", "content": f"{user_query} \n Here's the content:\n{website
|
122 |
],
|
123 |
model="llama3-groq-70b-8192-tool-use-preview",
|
124 |
temperature=0.9,
|
|
|
103 |
with st.spinner("Scraping website..."):
|
104 |
website = get_all_details(url)
|
105 |
|
106 |
+
|
107 |
st.success("Website loaded successfully!")
|
108 |
# st.write(f"**Website Title:** {website.title}")
|
109 |
|
110 |
+
# else:
|
111 |
+
# st.error("Failed to load the website. Please check the URL.")
|
112 |
|
113 |
|
114 |
# Call Groq API for processing
|
|
|
118 |
chat_streaming = client.chat.completions.create(
|
119 |
messages=[
|
120 |
{"role": "system", "content": "You are a helpful assistant specializing in extracting and analyzing website content. Answer questions based on the provided website's content. Ensure responses are clear, concise, and formatted in Markdown for better readability. use your knowledge to add relevant inforation to thr users query"},
|
121 |
+
{"role": "user", "content": f"{user_query} \n Here's the content:\n{website}"}
|
122 |
],
|
123 |
model="llama3-groq-70b-8192-tool-use-preview",
|
124 |
temperature=0.9,
|