Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,21 +64,18 @@ def extract_keywords_with_gpt(user_input, max_tokens=100, temperature=0.3):
|
|
| 64 |
|
| 65 |
return extracted_keywords
|
| 66 |
|
| 67 |
-
def fetch_nasa_ads_references(
|
| 68 |
try:
|
| 69 |
-
#
|
| 70 |
-
|
| 71 |
|
| 72 |
-
#
|
| 73 |
-
simplified_query = keywords # Use keywords as the query
|
| 74 |
-
|
| 75 |
-
# Step 3: Query NASA ADS for relevant papers
|
| 76 |
papers = ADS.query_simple(simplified_query)
|
| 77 |
-
|
| 78 |
if not papers or len(papers) == 0:
|
| 79 |
return [("No results found", "N/A", "N/A")]
|
| 80 |
|
| 81 |
-
#
|
| 82 |
references = [
|
| 83 |
(
|
| 84 |
paper['title'][0],
|
|
|
|
| 64 |
|
| 65 |
return extracted_keywords
|
| 66 |
|
| 67 |
+
def fetch_nasa_ads_references(prompt):
|
| 68 |
try:
|
| 69 |
+
# Use the entire prompt for the query
|
| 70 |
+
simplified_query = prompt
|
| 71 |
|
| 72 |
+
# Query NASA ADS for relevant papers
|
|
|
|
|
|
|
|
|
|
| 73 |
papers = ADS.query_simple(simplified_query)
|
| 74 |
+
|
| 75 |
if not papers or len(papers) == 0:
|
| 76 |
return [("No results found", "N/A", "N/A")]
|
| 77 |
|
| 78 |
+
# Include authors in the references
|
| 79 |
references = [
|
| 80 |
(
|
| 81 |
paper['title'][0],
|