Hi.
Looking through the documentation and sample code of the Content Moderator API, I wanted to use the text_moderation.screen_text function to analyze some text and classify accordingly. However, it seems like the text_content input for the function must of type File object. But what I require is passing a python string object to it. I tried using io.StringIO(string) but it gave me a "memoryview: a bytes-like object is required, not 'str'" exception. I also tried encoding the string into a bytes object but it game me an error that it can't call .read() on the object.
Any idea if there's a workaround?
Thanks.