Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
4 |
-
return "Hello " + name + "!!"
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
iface.launch()
|
1 |
import gradio as gr
|
2 |
+
from aitextgen import aitextgen
|
3 |
|
4 |
+
ai = aitextgen(model="EleutherAI/gpt-neo-125M",to_gpu=True)
|
|
|
5 |
|
6 |
+
def ai_text(inp):
|
7 |
+
generated_text = ai.generate_one(max_length = 1000, prompt = inp, no_repeat_ngram_size = 3) #repetition_penalty = 1.9)
|
8 |
+
#print(type(generated_text))
|
9 |
+
return generated_text
|
10 |
+
|
11 |
+
output_text = gr.outputs.Textbox()
|
12 |
+
iface = gr.Interface(ai_text,"textbox", output_text, title="ai generated Blog with GPT-Neo",
|
13 |
+
description="AI Generated Blog Content with GPT-Neo - via {aitextgen}")
|
14 |
+
|
15 |
iface.launch()
|