Ling / tasks /extraction.py
Nam Fam
update files
ea99abb
raw
history blame contribute delete
317 Bytes
from utils.remote_client import execute_remote_task
def information_extraction(text: str, model: str) -> str:
resp = execute_remote_task("extraction", {"text": text, "model": model})
if "error" in resp:
return "Oops! Something went wrong. Please try again later."
return resp.get("entities", "")