File tree 6 files changed +8
-3
lines changed
6 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pip install structured-qa
51
51
structured-qa \
52
52
--question " What optimizer was used to train the model?" \
53
53
--input_file " example_data/1706.03762v7.pdf" \
54
- --output_folder " example_outputs/1706.03762v7.pdf"
54
+ --output_dir " example_outputs/1706.03762v7.pdf"
55
55
```
56
56
57
57
### Graphical Interface App
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Or provide values to the arguments directly:
15
15
structured-qa \
16
16
--question " What learning rate was used?" \
17
17
--input_file " example_data/1706.03762v7.pdf" \
18
- --output_folder " example_outputs/1706.03762v7.pdf"
18
+ --output_dir " example_outputs/1706.03762v7.pdf"
19
19
```
20
20
21
21
---
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ This Blueprint is designed to be flexible and easily adaptable to your specific
6
6
7
7
## 🖋️ ** Customizable Parameters**
8
8
9
+ -- ** ` question ` ** : The question to be answered.
10
+
9
11
- ** ` input_file ` ** : The input file specifies the document to be processed. Supports the ` pdf ` format.
10
12
11
13
- ** ` output_dir ` ** : Path to the output directory where the extracted sections will be saved.
Original file line number Diff line number Diff line change
1
+ question : " What optimizer was used to train the model?"
1
2
input_file : example_data/1706.03762v7.pdf
2
3
output_dir : example_outputs/1706.03762v7.pdf
3
4
model : " bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf"
Original file line number Diff line number Diff line change 12
12
13
13
@logger .catch (reraise = True )
14
14
def structured_qa (
15
- question : str ,
15
+ question : str | None = None ,
16
16
input_file : str | None = None ,
17
17
output_dir : str | None = None ,
18
18
model : str
@@ -57,6 +57,7 @@ def structured_qa(
57
57
else :
58
58
Path (output_dir ).mkdir (exist_ok = True , parents = True )
59
59
config = Config (
60
+ question = question ,
60
61
input_file = input_file ,
61
62
output_dir = output_dir ,
62
63
model = model ,
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ def answer_prompt(value):
60
60
61
61
62
62
class Config (BaseModel ):
63
+ question : str
63
64
input_file : FilePath
64
65
output_dir : DirectoryPath
65
66
model : Annotated [str , AfterValidator (validate_model )]
You can’t perform that action at this time.
0 commit comments