Spaces:
Build error
Build error
Download app.py from TusharPani/react-ui-generator: direct link, hf CLI and curl.
- Browser
- Download file 324 Bytes
-
https://huggingface.co/spaces/TusharPani/react-ui-generator/resolve/main/app.py
- Command line
-
hf download hf://spaces/TusharPani/react-ui-generator/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TusharPani/react-ui-generator/resolve/main/app.py
324 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| generator = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B") | |
| def generate_ui(prompt): | |
| result = generator(prompt, max_length=200)[0]["generated_text"] | |
| return result | |
| iface = gr.Interface(fn=generate_ui, inputs="text", outputs="text") | |
| iface.launch() | |