INNER CODE UNIT · Python

classify

maxpumperla/learning_ray · notebooks/app.py:56

    async def classify(self, input_text: str) -> str:
        return await self.classify_batched(input_text)


batched_deployment = SentimentAnalysis.bind()


from typing import Optional

import wikipedia


def fetch_wikipedia_page(search_term: str) -> Optional[str]:
    results = wikipedia.search(search_term)
    # If no results, return to caller.
    if len(results) == 0:
        return None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…