Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,27 +1,22 @@
|
|
1 |
import os
|
2 |
-
|
3 |
import shutil
|
4 |
-
|
5 |
import PyPDF2
|
6 |
-
|
7 |
import gradio as gr
|
8 |
-
|
9 |
from PIL import Image
|
10 |
|
11 |
-
from transformers import BlipProcessor, BlipForConditionalGeneration
|
12 |
-
|
13 |
-
from huggingface_hub import InferenceClient
|
14 |
-
|
15 |
-
from langchain_huggingface import HuggingFaceEmbeddings
|
16 |
-
|
17 |
# Unstructured for rich PDF parsing
|
18 |
from unstructured.partition.pdf import partition_pdf
|
19 |
from unstructured.partition.utils.constants import PartitionStrategy
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
# LangChain vectorstore and embeddings
|
23 |
from langchain_community.vectorstores import FAISS
|
24 |
-
from
|
25 |
|
26 |
|
27 |
|
|
|
1 |
import os
|
|
|
2 |
import shutil
|
|
|
3 |
import PyPDF2
|
|
|
4 |
import gradio as gr
|
|
|
5 |
from PIL import Image
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Unstructured for rich PDF parsing
|
8 |
from unstructured.partition.pdf import partition_pdf
|
9 |
from unstructured.partition.utils.constants import PartitionStrategy
|
10 |
|
11 |
+
# Vision-language captioning (BLIP)
|
12 |
+
from transformers import BlipProcessor, BlipForConditionalGeneration
|
13 |
+
|
14 |
+
# Hugging Face Inference client
|
15 |
+
from huggingface_hub import InferenceClient
|
16 |
|
17 |
# LangChain vectorstore and embeddings
|
18 |
from langchain_community.vectorstores import FAISS
|
19 |
+
from langchain_huggingface import HuggingFaceEmbeddings
|
20 |
|
21 |
|
22 |
|