yxccai commited on
Commit
1ce8509
·
verified ·
1 Parent(s): fd512ab

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +10 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ pipe = pipeline("text2text-generation", model="yxccai/text-style")
5
+
6
+ def chat(input_text):
7
+ result = pipe(input_text, max_new_tokens=512)[0]["generated_text"]
8
+ return result
9
+
10
+ gr.Interface(fn=chat, inputs="text", outputs="text").launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ transformers
2
+ gradio