Spaces:
Build error
Build error
student-abdullah
commited on
Commit
•
36a844a
1
Parent(s):
8831ca0
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=1024,
|
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=1024):
|
86 |
if len(text) <= max_length:
|
87 |
return text
|
88 |
|