Create app
Browse files
    	
        app
    ADDED
    
    | 
         @@ -0,0 +1,12 @@ 
     | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
| 
         | 
|
| 1 | 
         
            +
            import streamlit as st
         
     | 
| 2 | 
         
            +
            from transformers import pipeline
         
     | 
| 3 | 
         
            +
             
     | 
| 4 | 
         
            +
            import streamlit as st
         
     | 
| 5 | 
         
            +
            from transformers import pipeline
         
     | 
| 6 | 
         
            +
             
     | 
| 7 | 
         
            +
            pipe= pipeline("text-classification", model="j-hartmann/sentiment-roberta-large-english-3-classes", return_all_scores=True)
         
     | 
| 8 | 
         
            +
            text=st.text_area('enter some text!')
         
     | 
| 9 | 
         
            +
             
     | 
| 10 | 
         
            +
            if text:
         
     | 
| 11 | 
         
            +
                out = pipe(text)
         
     | 
| 12 | 
         
            +
                st.json(out)
         
     |