CognitiveScience commited on
Commit
001881c
1 Parent(s): 5b4b923

Update acogsphere.py

Browse files
Files changed (1) hide show
  1. acogsphere.py +12 -3
acogsphere.py CHANGED
@@ -1,6 +1,15 @@
1
- from transformers import pipeline
2
 
3
- classifier = pipeline("sentiment-analysis") #, model="stevhliu/my_awesome_model")
 
 
 
 
 
4
  def acf(text1):
5
- acfresult=classifier(text1)
 
 
 
 
6
  return acfresult
 
1
+ #from transformers import pipeline
2
 
3
+ #classifier = pipeline("sentiment-analysis") #, model="stevhliu/my_awesome_model")
4
+ from gradio_client import Client
5
+
6
+ client = Client("cognitivescience-sentimentanalysis.hf.space")
7
+
8
+ #print(result)
9
  def acf(text1):
10
+ acfresult = client.predict(
11
+ text1, # str in 'input_text' Textbox component
12
+ api_name="/predict"
13
+ )
14
+ #acfresult=classifier(text1)
15
  return acfresult