Spaces:
Runtime error
Runtime error
API and PPTX
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ word_embedding_model = models.Transformer('sentence-transformers/all-MiniLM-L6-v
|
|
21 |
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension(), pooling_mode='cls')
|
22 |
embedder = SentenceTransformer(modules=[word_embedding_model, pooling_model])
|
23 |
ocr = CnOcr()
|
24 |
-
# chat_url = 'https://Raghav001-
|
25 |
-
chat_url = 'https://Raghav001-
|
26 |
headers = {
|
27 |
'Content-Type': 'application/json',
|
28 |
}
|
@@ -32,7 +32,7 @@ all_max_len = 3000
|
|
32 |
|
33 |
|
34 |
def get_emb(text):
|
35 |
-
emb_url = 'https://Raghav001-
|
36 |
data = {"content": text}
|
37 |
try:
|
38 |
result = requests.post(url=emb_url,
|
@@ -201,7 +201,7 @@ def up_file(fls):
|
|
201 |
# #Image Extraction
|
202 |
# for i in jpg:
|
203 |
# loader = UnstructuredImageLoader(i)
|
204 |
-
#
|
205 |
# # content = str(data).split("'")
|
206 |
# # cnt = content[1]
|
207 |
# # # c = cnt.split('\\n\\n')
|
|
|
21 |
pooling_model = models.Pooling(word_embedding_model.get_word_embedding_dimension(), pooling_mode='cls')
|
22 |
embedder = SentenceTransformer(modules=[word_embedding_model, pooling_model])
|
23 |
ocr = CnOcr()
|
24 |
+
# chat_url = 'https://Raghav001-API.hf.space/sale'
|
25 |
+
chat_url = 'https://Raghav001-API.hf.space/chatpdf'
|
26 |
headers = {
|
27 |
'Content-Type': 'application/json',
|
28 |
}
|
|
|
32 |
|
33 |
|
34 |
def get_emb(text):
|
35 |
+
emb_url = 'https://Raghav001-API.hf.space/embeddings'
|
36 |
data = {"content": text}
|
37 |
try:
|
38 |
result = requests.post(url=emb_url,
|
|
|
201 |
# #Image Extraction
|
202 |
# for i in jpg:
|
203 |
# loader = UnstructuredImageLoader(i)
|
204 |
+
# data = loader.load()
|
205 |
# # content = str(data).split("'")
|
206 |
# # cnt = content[1]
|
207 |
# # # c = cnt.split('\\n\\n')
|