PatrickML commited on
Commit
45613fe
1 Parent(s): f8236f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -30,11 +30,10 @@ def predict_sentiment(text):
30
  input = vectoriser.transform(input)
31
  res = model.predict(input)
32
  if (res==1):
33
- sentiment_url="https://files.selecthealth.cloud/api/public/content/228422-being_positive_blog_lg.jpg"
34
  else :
35
- sentiment_url="https://mentalhealthatease.com/wp-content/uploads/2022/02/girl-with-negative-thoughts-scaled.jpeg"
36
- img = Image.open(requests.get(sentiment_url, stream=True).raw)
37
- return img
38
 
39
 
40
  iface = gr.Interface(
 
30
  input = vectoriser.transform(input)
31
  res = model.predict(input)
32
  if (res==1):
33
+ sentiment="https://files.selecthealth.cloud/api/public/content/228422-being_positive_blog_lg.jpg"
34
  else :
35
+ sentiment="https://mentalhealthatease.com/wp-content/uploads/2022/02/girl-with-negative-thoughts-scaled.jpeg"
36
+ return sentiment
 
37
 
38
 
39
  iface = gr.Interface(