nicolaleo commited on
Commit
f63532b
1 Parent(s): 6b35464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -1,15 +1,17 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
- #pipe=pipeline("sentiment-analysis")
5
- #text=st.text_area("enter the text:")
6
  ##x = st.slider('Select a value')
7
  ##st.write(x, 'squared is', x * x)
8
 
9
- #if text:
10
- #out=pipe(text)
11
- #st.json(out)
12
 
 
 
13
  from transformers import DetrFeatureExtractor, DetrForObjectDetection
14
  from PIL import Image
15
  import requests
@@ -33,4 +35,5 @@ logits = outputs.logits
33
  bboxes = outputs.pred_boxes
34
 
35
  if bboxes:
36
- st.json(bboxes)
 
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ pipe=pipeline("sentiment-analysis")
5
+ text=st.text_area("enter the text:")
6
  ##x = st.slider('Select a value')
7
  ##st.write(x, 'squared is', x * x)
8
 
9
+ if text:
10
+ out=pipe(text)
11
+ st.json(out)
12
 
13
+
14
+ """
15
  from transformers import DetrFeatureExtractor, DetrForObjectDetection
16
  from PIL import Image
17
  import requests
 
35
  bboxes = outputs.pred_boxes
36
 
37
  if bboxes:
38
+ st.json(bboxes)
39
+ """