Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
0a96328
1
Parent(s):
67f6824
Sync with https://github.com/mozilla-ai/structured-qa
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from pathlib import Path
|
|
4 |
import pymupdf
|
5 |
import streamlit as st
|
6 |
|
|
|
7 |
from structured_qa.model_loaders import load_llama_cpp_model
|
8 |
from structured_qa.preprocessing import document_to_sections_dir
|
9 |
from structured_qa.workflow import find_retrieve_answer
|
@@ -51,6 +52,8 @@ if uploaded_file is not None:
|
|
51 |
model=model,
|
52 |
sections_dir=f"example_outputs/{uploaded_file.name}",
|
53 |
question=question,
|
|
|
|
|
54 |
)
|
55 |
st.text("Sections checked:")
|
56 |
st.json(sections_checked)
|
|
|
4 |
import pymupdf
|
5 |
import streamlit as st
|
6 |
|
7 |
+
from structured_qa.config import ANSWER_PROMPT, FIND_PROMPT
|
8 |
from structured_qa.model_loaders import load_llama_cpp_model
|
9 |
from structured_qa.preprocessing import document_to_sections_dir
|
10 |
from structured_qa.workflow import find_retrieve_answer
|
|
|
52 |
model=model,
|
53 |
sections_dir=f"example_outputs/{uploaded_file.name}",
|
54 |
question=question,
|
55 |
+
find_prompt=FIND_PROMPT,
|
56 |
+
answer_prompt=ANSWER_PROMPT,
|
57 |
)
|
58 |
st.text("Sections checked:")
|
59 |
st.json(sections_checked)
|