Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,14 +4,15 @@ from langchain.llms import HuggingFaceHub
|
|
4 |
#Function to return the response
|
5 |
def generate_answer(query):
|
6 |
llm = HuggingFaceHub(
|
7 |
-
repo_id = "
|
8 |
model_kwargs={"temperature": 0.5, "max_length": 64,"max_new_tokens":512}
|
9 |
)
|
10 |
prompt = f"""
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
15 |
|
16 |
"""
|
17 |
result = llm.predict(prompt)
|
|
|
4 |
#Function to return the response
|
5 |
def generate_answer(query):
|
6 |
llm = HuggingFaceHub(
|
7 |
+
repo_id = "TheBloke/goliath-120b-GGUF",
|
8 |
model_kwargs={"temperature": 0.5, "max_length": 64,"max_new_tokens":512}
|
9 |
)
|
10 |
prompt = f"""
|
11 |
+
A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user's input.
|
12 |
+
USER:
|
13 |
+
Hi
|
14 |
+
ASSISTANT:
|
15 |
+
Hello! How can I help you today? If you have any questions or need assistance, feel free to ask.
|
16 |
|
17 |
"""
|
18 |
result = llm.predict(prompt)
|