aCogSphere / acogsphere.py
CognitiveScience's picture
Update acogsphere.py
001881c
raw
history blame
412 Bytes
#from transformers import pipeline
#classifier = pipeline("sentiment-analysis") #, model="stevhliu/my_awesome_model")
from gradio_client import Client
client = Client("cognitivescience-sentimentanalysis.hf.space")
#print(result)
def acf(text1):
acfresult = client.predict(
text1, # str in 'input_text' Textbox component
api_name="/predict"
)
#acfresult=classifier(text1)
return acfresult