Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -142,11 +142,8 @@ def extract_research_paper_arxiv(rp_number: str, node_type: str) -> dict:
|
|
| 142 |
Here is the document: <document>{rp_data['abstract']}<document>"""
|
| 143 |
|
| 144 |
try:
|
| 145 |
-
|
| 146 |
-
response =
|
| 147 |
-
model=model_name,
|
| 148 |
-
contents=prompt
|
| 149 |
-
)
|
| 150 |
|
| 151 |
rp_data["summary"] = response.text
|
| 152 |
logger.info(f"Summary generated for Arxiv ID: {rp_number}")
|
|
|
|
| 142 |
Here is the document: <document>{rp_data['abstract']}<document>"""
|
| 143 |
|
| 144 |
try:
|
| 145 |
+
model = genai.GenerativeModel("gemini-2.5-flash-preview-05-20")
|
| 146 |
+
response = model.generate_content(prompt)
|
|
|
|
|
|
|
|
|
|
| 147 |
|
| 148 |
rp_data["summary"] = response.text
|
| 149 |
logger.info(f"Summary generated for Arxiv ID: {rp_number}")
|