Spaces:
Runtime error
Runtime error
Download app.py from Pranav4datasc/AI-Blog-Generator: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/spaces/Pranav4datasc/AI-Blog-Generator/resolve/main/app.py
- Command line
-
hf download hf://spaces/Pranav4datasc/AI-Blog-Generator/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Pranav4datasc/AI-Blog-Generator/resolve/main/app.py
505 Bytes
| import gradio as gr | |
| from aitextgen import aitextgen | |
| ai = aitextgen(model="EleutherAI/gpt-neo-125M",to_gpu=True) | |
| def ai_text(inp): | |
| generated_text = ai.generate_one(max_length=1000, prompt = inp, no_repeat_ngram_size = 3) | |
| print(type(generated_text)) | |
| return generated_text | |
| output_text = gr.output.Textbox() | |
| gr.Interface(ai_text,'texbox',output_text,title="Ai Generated Blog using GPT-Neo", | |
| description="AI Generated Blog Content with GPT-Neo - via{aitextgen}").launch() | |