Hans141 commited on
Commit
b488aa9
·
1 Parent(s): 6a76df1

initial commit

Browse files
Files changed (3) hide show
  1. README.md +28 -1
  2. app.py +7 -0
  3. requirements.txt +2 -0
README.md CHANGED
@@ -1 +1,28 @@
1
- # demo-huggingface
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Demo Test
3
+ emoji: 🐢
4
+ colorFrom: blue
5
+ colorTo: gray
6
+ sdk: streamlit
7
+ app_file: app.py
8
+ pinned: false
9
+ ---
10
+ # Configuration
11
+ `title`: _string_
12
+ Display title for the Space
13
+ `emoji`: _string_
14
+ Space emoji (emoji-only character allowed)
15
+ `colorFrom`: _string_
16
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
17
+ `colorTo`: _string_
18
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
19
+ `sdk`: _string_
20
+ Can be either `gradio` or `streamlit`
21
+ `sdk_version` : _string_
22
+ Only applicable for `streamlit` SDK.
23
+ See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
24
+ `app_file`: _string_
25
+ Path to your main application file (which contains either `gradio` or `streamlit` Python code).
26
+ Path is relative to the root of the repository.
27
+ `pinned`: _boolean_
28
+ Whether the Space stays on top of your list
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+ pipe = pipeline('sentiment-analysis')
4
+ text = st.text_area('enter some text!')
5
+ if text:
6
+ out = pipe(text)
7
+ st.json(out)
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ torch
2
+ transformers