Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,19 +54,19 @@ else:
|
|
54 |
)
|
55 |
|
56 |
|
57 |
-
def generate_prompt(instruction, input=None):
|
58 |
-
|
59 |
-
|
60 |
-
### Instruction:
|
61 |
-
{instruction}
|
62 |
-
### Input:
|
63 |
-
{input}
|
64 |
-
### Response:"""
|
65 |
-
|
66 |
-
|
67 |
-
### Instruction:
|
68 |
-
{instruction}
|
69 |
-
### Response:"""
|
70 |
|
71 |
if device != "cpu":
|
72 |
model.half()
|
@@ -77,6 +77,7 @@ if torch.__version__ >= "2":
|
|
77 |
|
78 |
def evaluate(
|
79 |
instruction,
|
|
|
80 |
):
|
81 |
temperature=0.1,
|
82 |
top_p=0.75,
|
|
|
54 |
)
|
55 |
|
56 |
|
57 |
+
# def generate_prompt(instruction, input=None):
|
58 |
+
# if input:
|
59 |
+
# return f"""Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
60 |
+
# ### Instruction:
|
61 |
+
# {instruction}
|
62 |
+
# ### Input:
|
63 |
+
# {input}
|
64 |
+
# ### Response:"""
|
65 |
+
# else:
|
66 |
+
# return f"""Below is an instruction that describes a task. Write a response that appropriately completes the request.
|
67 |
+
# ### Instruction:
|
68 |
+
# {instruction}
|
69 |
+
# ### Response:"""
|
70 |
|
71 |
if device != "cpu":
|
72 |
model.half()
|
|
|
77 |
|
78 |
def evaluate(
|
79 |
instruction,
|
80 |
+
**kwargs,
|
81 |
):
|
82 |
temperature=0.1,
|
83 |
top_p=0.75,
|