Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
from getpass import getpass
|
5 |
import os
|
6 |
|
7 |
-
template = """Question: {
|
8 |
------------------
|
9 |
Answer: Let's think step by step."""
|
10 |
|
@@ -13,7 +13,7 @@ prompt = PromptTemplate(template=template, input_variables=["history"])
|
|
13 |
# Callbacks support token-wise streaming
|
14 |
callbacks = [StreamingStdOutCallbackHandler()]
|
15 |
# Instantiate the Hugging Face model
|
16 |
-
repo_id = "
|
17 |
llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0, "max_length": 64})
|
18 |
|
19 |
# Initialize the chain
|
|
|
4 |
from getpass import getpass
|
5 |
import os
|
6 |
|
7 |
+
template = """Question: {question}
|
8 |
------------------
|
9 |
Answer: Let's think step by step."""
|
10 |
|
|
|
13 |
# Callbacks support token-wise streaming
|
14 |
callbacks = [StreamingStdOutCallbackHandler()]
|
15 |
# Instantiate the Hugging Face model
|
16 |
+
repo_id = "gpt2" # Replace with the desired model
|
17 |
llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0, "max_length": 64})
|
18 |
|
19 |
# Initialize the chain
|