csuvikv commited on
Commit
3553dd8
·
1 Parent(s): b2709d0

initial commit

Browse files
Files changed (2) hide show
  1. app.py +19 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline, set_seed
3
+
4
+
5
+ generator = pipeline('text-generation', model='EleutherAI/gpt-j-6B', return_full_text=False)
6
+ set_seed(42)
7
+
8
+
9
+ def Bemenet(bemenet):
10
+ return generator(bemenet, max_length=100, num_return_sequences=2)[1]['generated_text']
11
+
12
+
13
+ interface = gr.Interface(fn=Bemenet,
14
+ title="Cím..",
15
+ description="Leírás..",
16
+ inputs="text",
17
+ outputs="text")
18
+
19
+ interface.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ transformers
2
+ tensorflow