Spaces:
Sleeping
Sleeping
Commit
·
402cfa6
1
Parent(s):
9de24de
feat: add link to hal
Browse files- app.py +1 -1
- custom_pgvector.py +3 -1
app.py
CHANGED
@@ -191,7 +191,7 @@ with doc_column:
|
|
191 |
doc_content = json.loads(doc.page_content)
|
192 |
|
193 |
expander = st.expander(doc_content["title"])
|
194 |
-
expander.markdown(f"**
|
195 |
expander.markdown(doc_content["abstract"])
|
196 |
expander.markdown(f"**Authors** : {doc_content['authors']}")
|
197 |
expander.markdown(f"**Keywords** : {doc_content['keywords']}")
|
|
|
191 |
doc_content = json.loads(doc.page_content)
|
192 |
|
193 |
expander = st.expander(doc_content["title"])
|
194 |
+
expander.markdown(f"**HalID** : https://hal.science/{doc_content['hal_id']}")
|
195 |
expander.markdown(doc_content["abstract"])
|
196 |
expander.markdown(f"**Authors** : {doc_content['authors']}")
|
197 |
expander.markdown(f"**Keywords** : {doc_content['keywords']}")
|
custom_pgvector.py
CHANGED
@@ -319,7 +319,7 @@ class CustomPGVector(VectorStore):
|
|
319 |
"title": result["title"][0],
|
320 |
"authors": result["authors"],
|
321 |
"doi": result["doi"],
|
322 |
-
|
323 |
"keywords": result["keywords"],
|
324 |
"distance": result["distance"],
|
325 |
}
|
@@ -345,6 +345,7 @@ class CustomPGVector(VectorStore):
|
|
345 |
a.id,
|
346 |
a.title_en,
|
347 |
a.doi,
|
|
|
348 |
a.abstract_en,
|
349 |
string_agg(distinct keyword."name", ',') as keywords,
|
350 |
string_agg(distinct author."name", ',') as authors,
|
@@ -370,6 +371,7 @@ class CustomPGVector(VectorStore):
|
|
370 |
"id",
|
371 |
"title",
|
372 |
"doi",
|
|
|
373 |
"abstract",
|
374 |
"keywords",
|
375 |
"authors",
|
|
|
319 |
"title": result["title"][0],
|
320 |
"authors": result["authors"],
|
321 |
"doi": result["doi"],
|
322 |
+
"hal_id": result["hal_id"],
|
323 |
"keywords": result["keywords"],
|
324 |
"distance": result["distance"],
|
325 |
}
|
|
|
345 |
a.id,
|
346 |
a.title_en,
|
347 |
a.doi,
|
348 |
+
a.hal_id,
|
349 |
a.abstract_en,
|
350 |
string_agg(distinct keyword."name", ',') as keywords,
|
351 |
string_agg(distinct author."name", ',') as authors,
|
|
|
371 |
"id",
|
372 |
"title",
|
373 |
"doi",
|
374 |
+
"hal_id",
|
375 |
"abstract",
|
376 |
"keywords",
|
377 |
"authors",
|