Spaces:
Sleeping
Sleeping
Sam-Oliveira commited on
Commit ·
f95907e
1
Parent(s): 9f1f697
Change ideation max tokens
Browse files- src/ideate.py +1 -1
- src/streamlit_app.py +1 -0
src/ideate.py
CHANGED
|
@@ -41,5 +41,5 @@ def ideate_from_ids(ids: List[str]) -> Optional[str]:
|
|
| 41 |
return None
|
| 42 |
|
| 43 |
llm = load_pipe()
|
| 44 |
-
return llm(IDEA_PROMPT.format(context="\n".join(ctx)), max_new_tokens=
|
| 45 |
do_sample=False)[0]['generated_text'].strip()
|
|
|
|
| 41 |
return None
|
| 42 |
|
| 43 |
llm = load_pipe()
|
| 44 |
+
return llm(IDEA_PROMPT.format(context="\n".join(ctx)), max_new_tokens=500,
|
| 45 |
do_sample=False)[0]['generated_text'].strip()
|
src/streamlit_app.py
CHANGED
|
@@ -8,6 +8,7 @@ Streamlit app for the research assistant.
|
|
| 8 |
"""
|
| 9 |
import pathlib, tempfile
|
| 10 |
import os
|
|
|
|
| 11 |
CACHE_DIR = pathlib.Path(tempfile.gettempdir()) / "hf_cache"
|
| 12 |
os.environ["XDG_CACHE_HOME"] = str(pathlib.Path(tempfile.gettempdir()) / "hf_cache")
|
| 13 |
for var in (
|
|
|
|
| 8 |
"""
|
| 9 |
import pathlib, tempfile
|
| 10 |
import os
|
| 11 |
+
# set up for Hugging Face Spaces
|
| 12 |
CACHE_DIR = pathlib.Path(tempfile.gettempdir()) / "hf_cache"
|
| 13 |
os.environ["XDG_CACHE_HOME"] = str(pathlib.Path(tempfile.gettempdir()) / "hf_cache")
|
| 14 |
for var in (
|