mahek jasani
commited on
Create chat.py
Browse files
chat.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import automodel, pipeline
|
| 3 |
+
from datasets import load_dataset
|
| 4 |
+
|
| 5 |
+
dataset = load_dataset("mahekjasani/hindidataset")
|
| 6 |
+
|
| 7 |
+
pipline= pipeline('Text Classification')
|
| 8 |
+
text= gr.tetx_area('enter some text!')
|
| 9 |
+
|
| 10 |
+
if text:
|
| 11 |
+
out = pipe(text)
|
| 12 |
+
gr.json(out)
|