Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,8 @@ whisper_pipe = pipeline(
|
|
32 |
device=device
|
33 |
)
|
34 |
|
35 |
-
# Setup
|
36 |
-
flan_t5_model_id = "
|
37 |
|
38 |
try:
|
39 |
flan_t5_tokenizer = T5Tokenizer.from_pretrained(flan_t5_model_id)
|
@@ -87,7 +87,7 @@ def extract_text_from_pdf(pdf_file):
|
|
87 |
st.error(f"Error extracting text from PDF: {e}")
|
88 |
return text, questions
|
89 |
|
90 |
-
# Function to generate form data with
|
91 |
def generate_form_data(text, questions):
|
92 |
responses = []
|
93 |
for question in questions:
|
|
|
32 |
device=device
|
33 |
)
|
34 |
|
35 |
+
# Setup T5-Base model and tokenizer
|
36 |
+
flan_t5_model_id = "t5-base"
|
37 |
|
38 |
try:
|
39 |
flan_t5_tokenizer = T5Tokenizer.from_pretrained(flan_t5_model_id)
|
|
|
87 |
st.error(f"Error extracting text from PDF: {e}")
|
88 |
return text, questions
|
89 |
|
90 |
+
# Function to generate form data with T5-Base
|
91 |
def generate_form_data(text, questions):
|
92 |
responses = []
|
93 |
for question in questions:
|