DingShinn commited on
Commit
faf0531
·
1 Parent(s): a553265

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -1,12 +1,10 @@
1
  import os
2
  import streamlit as st
 
3
  from transformers import pipeline
4
  from datasets import load_dataset
5
  from huggingface_hub.inference_api import InferenceApi
6
 
7
- dataset = load_dataset("merve/poetry", streaming=True)
8
- df = pd.DataFrame.from_dict(dataset["train"])
9
-
10
  pipe = pipeline("sentiment-analysis")
11
  text1 = st.text_area("enter some text 111")
12
 
@@ -24,6 +22,11 @@ if text2:
24
  res = inference(inputs=text2)
25
  st.json(res)
26
 
 
 
 
 
 
27
  # import streamlit as st
28
 
29
  # # adding the text that will show in the text box as default
 
1
  import os
2
  import streamlit as st
3
+ import pandas as pd
4
  from transformers import pipeline
5
  from datasets import load_dataset
6
  from huggingface_hub.inference_api import InferenceApi
7
 
 
 
 
8
  pipe = pipeline("sentiment-analysis")
9
  text1 = st.text_area("enter some text 111")
10
 
 
22
  res = inference(inputs=text2)
23
  st.json(res)
24
 
25
+
26
+ dataset = load_dataset("merve/poetry", streaming=True)
27
+ df = pd.DataFrame.from_dict(dataset["train"])
28
+ st.write(df)
29
+
30
  # import streamlit as st
31
 
32
  # # adding the text that will show in the text box as default