Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,6 +39,7 @@ def use_pdf_extractor(pdf_filepath):
|
|
| 39 |
result = pdf_extractor.extract(content, config)
|
| 40 |
return str(result)
|
| 41 |
|
|
|
|
| 42 |
def use_gemini(pdf_filepath, key):
|
| 43 |
if pdf_filepath is None:
|
| 44 |
raise gr.Error("Please provide some input PDF: upload an PDF file")
|
|
@@ -52,6 +53,7 @@ def use_gemini(pdf_filepath, key):
|
|
| 52 |
result = gemini_extractor.extract(content, config)
|
| 53 |
return str(result)
|
| 54 |
|
|
|
|
| 55 |
def use_openai(pdf_filepath, key):
|
| 56 |
if pdf_filepath is None:
|
| 57 |
raise gr.Error("Please provide some input PDF: upload an PDF file")
|
|
|
|
| 39 |
result = pdf_extractor.extract(content, config)
|
| 40 |
return str(result)
|
| 41 |
|
| 42 |
+
@spaces.GPU
|
| 43 |
def use_gemini(pdf_filepath, key):
|
| 44 |
if pdf_filepath is None:
|
| 45 |
raise gr.Error("Please provide some input PDF: upload an PDF file")
|
|
|
|
| 53 |
result = gemini_extractor.extract(content, config)
|
| 54 |
return str(result)
|
| 55 |
|
| 56 |
+
@spaces.GPU
|
| 57 |
def use_openai(pdf_filepath, key):
|
| 58 |
if pdf_filepath is None:
|
| 59 |
raise gr.Error("Please provide some input PDF: upload an PDF file")
|