Spaces:
Sleeping
Sleeping
Update app_web.py
Browse files- app_web.py +8 -1
app_web.py
CHANGED
|
@@ -12,6 +12,13 @@ from src.verifier import verify_and_respond
|
|
| 12 |
from src.llm import list_models
|
| 13 |
from src.stata import explain_
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# ββ Session initialisation βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 17 |
|
|
@@ -237,7 +244,7 @@ def render_chat():
|
|
| 237 |
|
| 238 |
opts = [options.get(s) for s in selection]
|
| 239 |
result = explain_(qcat_result.get("action"), prompt, cfg, file_path, opts)
|
| 240 |
-
|
| 241 |
with st.chat_message("assistant"):
|
| 242 |
st.markdown(result)
|
| 243 |
return
|
|
|
|
| 12 |
from src.llm import list_models
|
| 13 |
from src.stata import explain_
|
| 14 |
|
| 15 |
+
from huggingface_hub import snapshot_download
|
| 16 |
+
|
| 17 |
+
snapshot_download(repo_id="CGIAR/weai-kb",
|
| 18 |
+
repo_type="dataset",
|
| 19 |
+
token=os.getenv('HF_TOKEN'),
|
| 20 |
+
local_dir="./"
|
| 21 |
+
)
|
| 22 |
|
| 23 |
# ββ Session initialisation βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 24 |
|
|
|
|
| 244 |
|
| 245 |
opts = [options.get(s) for s in selection]
|
| 246 |
result = explain_(qcat_result.get("action"), prompt, cfg, file_path, opts)
|
| 247 |
+
|
| 248 |
with st.chat_message("assistant"):
|
| 249 |
st.markdown(result)
|
| 250 |
return
|