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