Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
13 |
API_URL = os.environ.get("API_URL")
|
14 |
|
15 |
with open("./HHH_prompt.txt", "r") as f:
|
16 |
-
HHH_PROMPT = f.read()
|
17 |
-
|
18 |
-
#response = requests.get("https://huggingface.co/spaces/bigcode/bigcode-playground/resolve/main/HHH_prompt.txt")
|
19 |
-
#HHH_PROMPT = response.text
|
20 |
|
21 |
FIM_PREFIX = "<fim_prefix>"
|
22 |
FIM_MIDDLE = "<fim_middle>"
|
@@ -113,7 +110,7 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
|
|
113 |
if fim_mode:
|
114 |
output = prefix
|
115 |
elif chat_mode:
|
116 |
-
output =
|
117 |
else:
|
118 |
output = prompt
|
119 |
|
|
|
13 |
API_URL = os.environ.get("API_URL")
|
14 |
|
15 |
with open("./HHH_prompt.txt", "r") as f:
|
16 |
+
HHH_PROMPT = f.read() + "\n\n"
|
|
|
|
|
|
|
17 |
|
18 |
FIM_PREFIX = "<fim_prefix>"
|
19 |
FIM_MIDDLE = "<fim_middle>"
|
|
|
110 |
if fim_mode:
|
111 |
output = prefix
|
112 |
elif chat_mode:
|
113 |
+
output = chat_prompt
|
114 |
else:
|
115 |
output = prompt
|
116 |
|