Spaces:
Sleeping
Sleeping
error resolved
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ def extract_text_from_pdf(pdf_url):
|
|
| 77 |
@spaces.GPU
|
| 78 |
def predict_text(text, url = 'https://arinsight.co/2024_FA_AEC_1200_GR1_GR2.pdf'):
|
| 79 |
pdf_text = extract_text_from_pdf(url)
|
| 80 |
-
|
| 81 |
# Prepare the input messages
|
| 82 |
messages = [{"role": "user", "content": [{"type": "text", "text": text_combined}]}]
|
| 83 |
|
|
|
|
| 77 |
@spaces.GPU
|
| 78 |
def predict_text(text, url = 'https://arinsight.co/2024_FA_AEC_1200_GR1_GR2.pdf'):
|
| 79 |
pdf_text = extract_text_from_pdf(url)
|
| 80 |
+
text_combined = text + "\n\nExtracted Text from PDF:\n" + pdf_text
|
| 81 |
# Prepare the input messages
|
| 82 |
messages = [{"role": "user", "content": [{"type": "text", "text": text_combined}]}]
|
| 83 |
|