Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def get_card_info(hub_id: str) -> Tuple[str, str]:
|
|
47 |
logger.error(f"Error fetching dataset card for {hub_id}: {e}")
|
48 |
raise ValueError(f"Could not find model or dataset with id {hub_id}")
|
49 |
|
50 |
-
@
|
51 |
def generate_summary(card_text: str, card_type: str) -> str:
|
52 |
"""Generate a summary for the given card text."""
|
53 |
# Determine prefix based on card type
|
|
|
47 |
logger.error(f"Error fetching dataset card for {hub_id}: {e}")
|
48 |
raise ValueError(f"Could not find model or dataset with id {hub_id}")
|
49 |
|
50 |
+
@spaces.GPU
|
51 |
def generate_summary(card_text: str, card_type: str) -> str:
|
52 |
"""Generate a summary for the given card text."""
|
53 |
# Determine prefix based on card type
|