Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,13 +44,9 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 44 |
@tool
|
| 45 |
def extract_sent(doc: str, top_n: int = 3) -> list:
|
| 46 |
""" Extracts key sentences from a document using TextRank.
|
| 47 |
-
|
| 48 |
Args:
|
| 49 |
-
doc
|
| 50 |
-
top_n
|
| 51 |
-
|
| 52 |
-
Returns:
|
| 53 |
-
List[str]: The most pertinent sentences.
|
| 54 |
"""
|
| 55 |
try:
|
| 56 |
# Step 1: Tokenize the document into sentences
|
|
|
|
| 44 |
@tool
|
| 45 |
def extract_sent(doc: str, top_n: int = 3) -> list:
|
| 46 |
""" Extracts key sentences from a document using TextRank.
|
|
|
|
| 47 |
Args:
|
| 48 |
+
doc: The document (e.g., abstract) to extract sentences from.
|
| 49 |
+
top_n: The number of top-ranked sentences to return.
|
|
|
|
|
|
|
|
|
|
| 50 |
"""
|
| 51 |
try:
|
| 52 |
# Step 1: Tokenize the document into sentences
|