Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -56,6 +56,8 @@ def get_links_user_prompt(website):
|
|
56 |
user_prompt += "\n".join(website.links)
|
57 |
return user_prompt
|
58 |
|
|
|
|
|
59 |
# make the first call to get the important links
|
60 |
def get_links(url):
|
61 |
website = Website(url)
|
@@ -64,7 +66,7 @@ def get_links(url):
|
|
64 |
{"role": "system", "content":link_system_prompt },
|
65 |
{"role": "user", "content": get_links_user_prompt(website)}
|
66 |
],
|
67 |
-
model="
|
68 |
temperature=1,
|
69 |
max_tokens=2048,
|
70 |
stop=None,
|
@@ -86,10 +88,6 @@ def get_all_details(url):
|
|
86 |
return result
|
87 |
|
88 |
|
89 |
-
# Initialize Groq client
|
90 |
-
# load_dotenv()
|
91 |
-
api_key = os.getenv('GROQ_API_KEY')
|
92 |
-
client = Groq(api_key=api_key)
|
93 |
|
94 |
# Streamlit UI
|
95 |
st.title("Welcome to WebBot🌍")
|
@@ -118,7 +116,7 @@ if user_query:
|
|
118 |
{"role": "system", "content": "You are a helpful assistant specializing in extracting and analyzing website content. Provide information required by the user based on the website information provided. Ensure responses are clear, concise, and formatted in Markdown for better readability. use your knowledge to add relevant inforation to the users query"},
|
119 |
{"role": "user", "content": f"Here's the content to use:\n {website} \n Now respond appropriately to the query: {user_query}\n"}
|
120 |
],
|
121 |
-
model="
|
122 |
temperature=0.8,
|
123 |
max_tokens=2042,
|
124 |
top_p=0.6,
|
|
|
56 |
user_prompt += "\n".join(website.links)
|
57 |
return user_prompt
|
58 |
|
59 |
+
client=Groq(api_key=os.getenv("GROQ_API_KEY"))
|
60 |
+
|
61 |
# make the first call to get the important links
|
62 |
def get_links(url):
|
63 |
website = Website(url)
|
|
|
66 |
{"role": "system", "content":link_system_prompt },
|
67 |
{"role": "user", "content": get_links_user_prompt(website)}
|
68 |
],
|
69 |
+
model="llama-3.3-70b-specdec",
|
70 |
temperature=1,
|
71 |
max_tokens=2048,
|
72 |
stop=None,
|
|
|
88 |
return result
|
89 |
|
90 |
|
|
|
|
|
|
|
|
|
91 |
|
92 |
# Streamlit UI
|
93 |
st.title("Welcome to WebBot🌍")
|
|
|
116 |
{"role": "system", "content": "You are a helpful assistant specializing in extracting and analyzing website content. Provide information required by the user based on the website information provided. Ensure responses are clear, concise, and formatted in Markdown for better readability. use your knowledge to add relevant inforation to the users query"},
|
117 |
{"role": "user", "content": f"Here's the content to use:\n {website} \n Now respond appropriately to the query: {user_query}\n"}
|
118 |
],
|
119 |
+
model="llama-3.3-70b-specdec",
|
120 |
temperature=0.8,
|
121 |
max_tokens=2042,
|
122 |
top_p=0.6,
|