Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,9 +80,9 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
|
|
80 |
if FIM_INDICATOR in prompt:
|
81 |
fim_mode = True
|
82 |
try:
|
83 |
-
prefix, suffix = prompt.split(
|
84 |
except:
|
85 |
-
ValueError("Only one
|
86 |
prompt = f"{FIM_PREFIX}{prefix}{FIM_SUFFIX}{suffix}{FIM_MIDDLE}"
|
87 |
|
88 |
stream = client.generate_stream(prompt, **generate_kwargs)
|
|
|
80 |
if FIM_INDICATOR in prompt:
|
81 |
fim_mode = True
|
82 |
try:
|
83 |
+
prefix, suffix = prompt.split(FIM_INDICATOR)
|
84 |
except:
|
85 |
+
ValueError(f"Only one {FIM_INDICATOR} allowed in prompt!")
|
86 |
prompt = f"{FIM_PREFIX}{prefix}{FIM_SUFFIX}{suffix}{FIM_MIDDLE}"
|
87 |
|
88 |
stream = client.generate_stream(prompt, **generate_kwargs)
|