Spaces:
Runtime error
Runtime error
Commit
·
c9aebde
1
Parent(s):
c433997
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ model = Llama(model_path=hf_hub_download(repo_id=CONST_REPO_ID, filename=CONST_F
|
|
12 |
stop = ["@NODES", "@CODE", "@DECL"]
|
13 |
|
14 |
def generate(input_text):
|
15 |
-
if input_text.strip().
|
16 |
input_text+="\n"
|
17 |
output = model(input_text, max_tokens=128, stop=stop, echo=True)
|
18 |
return output['choices'][0]['text']
|
|
|
12 |
stop = ["@NODES", "@CODE", "@DECL"]
|
13 |
|
14 |
def generate(input_text):
|
15 |
+
if input_text.strip().startswith("#") and not input_text.strip().endswith("\n"):
|
16 |
input_text+="\n"
|
17 |
output = model(input_text, max_tokens=128, stop=stop, echo=True)
|
18 |
return output['choices'][0]['text']
|