Spaces:
Runtime error
Runtime error
abhi1nandy2
commited on
Commit
•
8735569
1
Parent(s):
9678d15
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def tag_visible(element):
|
|
21 |
|
22 |
text_list = []
|
23 |
homepage_url = "https://sites.google.com/view/abhilashnandy/home/"
|
24 |
-
extensions = [""
|
25 |
for ext in extensions:
|
26 |
url_text = get_text_from_url(homepage_url+ext)
|
27 |
text_list.append(url_text)
|
@@ -30,7 +30,7 @@ for ext in extensions:
|
|
30 |
"""
|
31 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
32 |
"""
|
33 |
-
client = InferenceClient("
|
34 |
|
35 |
SYSTEM_MESSAGE = "You are a QA chatbot to answer queries on my homepage that has the following information -\n\n" + "\n\n".join(text_list) + "\n\n"
|
36 |
|
@@ -38,7 +38,7 @@ def respond(
|
|
38 |
message,
|
39 |
history: list[tuple[str, str]],
|
40 |
system_message=SYSTEM_MESSAGE,
|
41 |
-
max_tokens=
|
42 |
temperature=0.7,
|
43 |
top_p=0.95,
|
44 |
):
|
|
|
21 |
|
22 |
text_list = []
|
23 |
homepage_url = "https://sites.google.com/view/abhilashnandy/home/"
|
24 |
+
extensions = ["", "pmrf-profile-page"]
|
25 |
for ext in extensions:
|
26 |
url_text = get_text_from_url(homepage_url+ext)
|
27 |
text_list.append(url_text)
|
|
|
30 |
"""
|
31 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
32 |
"""
|
33 |
+
client = InferenceClient("stabilityai/stablelm-2-1_6b-chat")#("stabilityai/stablelm-2-1_6b-chat")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ")#("TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF")#("QuantFactory/Meta-Llama-3-8B-Instruct-GGUF")#("HuggingFaceH4/zephyr-7b-beta")
|
34 |
|
35 |
SYSTEM_MESSAGE = "You are a QA chatbot to answer queries on my homepage that has the following information -\n\n" + "\n\n".join(text_list) + "\n\n"
|
36 |
|
|
|
38 |
message,
|
39 |
history: list[tuple[str, str]],
|
40 |
system_message=SYSTEM_MESSAGE,
|
41 |
+
max_tokens=80,
|
42 |
temperature=0.7,
|
43 |
top_p=0.95,
|
44 |
):
|