Spaces:
Sleeping
Sleeping
UPDATE: ThreadPoolExecutor
Browse files- functions.py +2 -3
functions.py
CHANGED
@@ -299,8 +299,7 @@ def getTextFromImagePDF(pdfBytes):
|
|
299 |
global reader
|
300 |
return "\n".join([text[1] for text in reader.readtext(np.array(image), paragraph=True)])
|
301 |
allImages = convert_from_bytes(pdfBytes)
|
302 |
-
|
303 |
-
texts = list(p.map(getText, allImages))
|
304 |
return "\n\n\n".join(texts)
|
305 |
|
306 |
def getTranscript(urls: str):
|
@@ -320,7 +319,7 @@ def getTranscript(urls: str):
|
|
320 |
|
321 |
|
322 |
def analyzeData(query, dataframe):
|
323 |
-
llm = ChatGroq(name = "
|
324 |
df = SmartDataframe(dataframe, config = {"llm": llm, "verbose": False})
|
325 |
response = df.chat(query)
|
326 |
if os.path.isfile(response):
|
|
|
299 |
global reader
|
300 |
return "\n".join([text[1] for text in reader.readtext(np.array(image), paragraph=True)])
|
301 |
allImages = convert_from_bytes(pdfBytes)
|
302 |
+
texts = [getText(image) for image in allImages]
|
|
|
303 |
return "\n\n\n".join(texts)
|
304 |
|
305 |
def getTranscript(urls: str):
|
|
|
319 |
|
320 |
|
321 |
def analyzeData(query, dataframe):
|
322 |
+
llm = ChatGroq(name = "llama-3.1-8b-instant")
|
323 |
df = SmartDataframe(dataframe, config = {"llm": llm, "verbose": False})
|
324 |
response = df.chat(query)
|
325 |
if os.path.isfile(response):
|