Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
from datasets import load_dataset
|
4 |
+
|
5 |
+
load_dataset("kaifahmad/Hate-Speech-Tweets")
|
6 |
+
pipe = pipeline("text-generation", model="cognitivecomputations/dolphin-2.7-mixtral-8x7b")
|
7 |
+
text = st.text_input('enter text here')
|
8 |
+
|
9 |
+
if text:
|
10 |
+
out = pipe(text)
|
11 |
+
st.json(out)
|