Spaces:
Build error
Build error
student-abdullah
commited on
Commit
•
2ff6484
1
Parent(s):
a7e51c6
Update a.py
Browse files
a.py
CHANGED
@@ -42,7 +42,7 @@ if st.sidebar.button("Locate"):
|
|
42 |
llm = LlamaCpp(
|
43 |
model_path="model.gguf",
|
44 |
temperature=0.7,
|
45 |
-
max_tokens=
|
46 |
top_p=1,
|
47 |
callbacks=[StreamingStdOutCallbackHandler()],
|
48 |
verbose=False,
|
@@ -82,7 +82,7 @@ def contains_profanity(text):
|
|
82 |
return any(word in text.lower() for word in PROFANE_WORDS)
|
83 |
|
84 |
|
85 |
-
def truncate_at_full_stop(text, max_length=
|
86 |
if len(text) <= max_length:
|
87 |
return text
|
88 |
|
|
|
42 |
llm = LlamaCpp(
|
43 |
model_path="model.gguf",
|
44 |
temperature=0.7,
|
45 |
+
max_tokens=512,
|
46 |
top_p=1,
|
47 |
callbacks=[StreamingStdOutCallbackHandler()],
|
48 |
verbose=False,
|
|
|
82 |
return any(word in text.lower() for word in PROFANE_WORDS)
|
83 |
|
84 |
|
85 |
+
def truncate_at_full_stop(text, max_length=512):
|
86 |
if len(text) <= max_length:
|
87 |
return text
|
88 |
|