Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,6 +11,7 @@ import base64
|
|
11 |
import tempfile
|
12 |
from reportlab.pdfgen import canvas
|
13 |
from reportlab.lib.pagesizes import letter
|
|
|
14 |
from PyPDF2 import PdfReader, PdfWriter
|
15 |
|
16 |
from hugchat import hugchat
|
@@ -24,7 +25,7 @@ from langchain.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLo
|
|
24 |
from langchain.document_loaders.generic import GenericLoader
|
25 |
from langchain.document_loaders.parsers import OpenAIWhisperParser
|
26 |
from langchain.schema import AIMessage, HumanMessage
|
27 |
-
from langchain.llms import HuggingFaceHub
|
28 |
from langchain.llms import HuggingFaceTextGenInference
|
29 |
from langchain.embeddings import HuggingFaceInstructEmbeddings, HuggingFaceEmbeddings, HuggingFaceBgeEmbeddings, HuggingFaceInferenceAPIEmbeddings
|
30 |
from langchain.retrievers.tavily_search_api import TavilySearchAPIRetriever
|
@@ -44,7 +45,7 @@ from beschreibungen import *
|
|
44 |
from dotenv import load_dotenv, find_dotenv
|
45 |
_ = load_dotenv(find_dotenv())
|
46 |
|
47 |
-
|
48 |
|
49 |
###############################################
|
50 |
#globale Variablen
|
|
|
11 |
import tempfile
|
12 |
from reportlab.pdfgen import canvas
|
13 |
from reportlab.lib.pagesizes import letter
|
14 |
+
from reportlab.lib.fonts import registerFont, findFontPath, getFontNames
|
15 |
from PyPDF2 import PdfReader, PdfWriter
|
16 |
|
17 |
from hugchat import hugchat
|
|
|
25 |
from langchain.document_loaders.generic import GenericLoader
|
26 |
from langchain.document_loaders.parsers import OpenAIWhisperParser
|
27 |
from langchain.schema import AIMessage, HumanMessage
|
28 |
+
from langchain.llms import HuggingFaceHub, HuggingFaceChain
|
29 |
from langchain.llms import HuggingFaceTextGenInference
|
30 |
from langchain.embeddings import HuggingFaceInstructEmbeddings, HuggingFaceEmbeddings, HuggingFaceBgeEmbeddings, HuggingFaceInferenceAPIEmbeddings
|
31 |
from langchain.retrievers.tavily_search_api import TavilySearchAPIRetriever
|
|
|
45 |
from dotenv import load_dotenv, find_dotenv
|
46 |
_ = load_dotenv(find_dotenv())
|
47 |
|
48 |
+
registerFont(TTFont('DejaVuSerif', './DejaVuSerif.ttf'))
|
49 |
|
50 |
###############################################
|
51 |
#globale Variablen
|