Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from bertopic import BERTopic
|
2 |
+
import streamlit as st
|
3 |
+
from transformers import pipeline
|
4 |
+
import pandas as pd
|
5 |
+
|
6 |
+
docs=pd.read_csv('/rows.csv')
|
7 |
+
topic_model = BERTopic()
|
8 |
+
model = topic_model.fit(docs)
|
9 |
+
|
10 |
+
text=st.text_area('enter customer feedback')
|
11 |
+
if text:
|
12 |
+
out =model.transform(text)
|
13 |
+
st.json(out)
|