Spaces:
Sleeping
Sleeping
arithescientist
commited on
Commit
·
91cbd61
1
Parent(s):
5a61d18
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,8 @@ import gradio as gr
|
|
3 |
import numpy as np
|
4 |
import pytesseract as pt
|
5 |
import pdf2image
|
|
|
|
|
6 |
from fpdf import FPDF
|
7 |
import re
|
8 |
import nltk
|
@@ -27,8 +29,10 @@ bert_legal_model = Summarizer(custom_model=custom_model, custom_tokenizer=custom
|
|
27 |
from zipfile import ZipFile
|
28 |
|
29 |
def zip_to_json(file_obj):
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
#def pdf(file_name):
|
34 |
|
|
|
3 |
import numpy as np
|
4 |
import pytesseract as pt
|
5 |
import pdf2image
|
6 |
+
import os
|
7 |
+
import tempfile
|
8 |
from fpdf import FPDF
|
9 |
import re
|
10 |
import nltk
|
|
|
29 |
from zipfile import ZipFile
|
30 |
|
31 |
def zip_to_json(file_obj):
|
32 |
+
with tempfile.TemporaryDirectory() as t_dir:
|
33 |
+
os.path.join (t_dir, 'sample.png')
|
34 |
+
|
35 |
+
return file_obj
|
36 |
|
37 |
#def pdf(file_name):
|
38 |
|