Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ def extract_metadata(text):
|
|
| 73 |
def get_summary(text):
|
| 74 |
prompt = f"Summarize the key contributions and findings of this abstract in 2–3 sentences:\n\n{text}"
|
| 75 |
response = client.chat.completions.create(
|
| 76 |
-
model="
|
| 77 |
messages=[{"role": "user", "content": prompt}]
|
| 78 |
)
|
| 79 |
return response.choices[0].message.content.strip()
|
|
@@ -82,7 +82,7 @@ def get_summary(text):
|
|
| 82 |
def get_limitations(text):
|
| 83 |
prompt = f"Extract only the limitations or challenges discussed in this abstract (if any). If none, write 'No explicit limitations mentioned'.\n\n{text}"
|
| 84 |
response = client.chat.completions.create(
|
| 85 |
-
model="
|
| 86 |
messages=[{"role": "user", "content": prompt}]
|
| 87 |
)
|
| 88 |
return response.choices[0].message.content.strip()
|
|
|
|
| 73 |
def get_summary(text):
|
| 74 |
prompt = f"Summarize the key contributions and findings of this abstract in 2–3 sentences:\n\n{text}"
|
| 75 |
response = client.chat.completions.create(
|
| 76 |
+
model="llama-3.1-8b-instant",
|
| 77 |
messages=[{"role": "user", "content": prompt}]
|
| 78 |
)
|
| 79 |
return response.choices[0].message.content.strip()
|
|
|
|
| 82 |
def get_limitations(text):
|
| 83 |
prompt = f"Extract only the limitations or challenges discussed in this abstract (if any). If none, write 'No explicit limitations mentioned'.\n\n{text}"
|
| 84 |
response = client.chat.completions.create(
|
| 85 |
+
model="llama-3.1-8b-instant",
|
| 86 |
messages=[{"role": "user", "content": prompt}]
|
| 87 |
)
|
| 88 |
return response.choices[0].message.content.strip()
|