Spaces:
Runtime error
Runtime error
Commit
·
a71cc4a
1
Parent(s):
6bac6a6
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,8 @@ from huggingface_hub import hf_hub_download, list_repo_files
|
|
| 12 |
tts = None
|
| 13 |
|
| 14 |
def read_pdf(file):
|
| 15 |
-
|
|
|
|
| 16 |
return text
|
| 17 |
|
| 18 |
# iface = gr.Interface(
|
|
|
|
| 12 |
tts = None
|
| 13 |
|
| 14 |
def read_pdf(file):
|
| 15 |
+
with open(file.name, "rb") as f:
|
| 16 |
+
text = extract_text(f)
|
| 17 |
return text
|
| 18 |
|
| 19 |
# iface = gr.Interface(
|