Spaces:
Runtime error
Runtime error
Download app.py from jeshwanth93/trainpy: direct link, hf CLI and curl.
- Browser
- Download file 376 Bytes
-
https://huggingface.co/spaces/jeshwanth93/trainpy/resolve/main/app.py
- Command line
-
hf download hf://spaces/jeshwanth93/trainpy/app.py
-
curl -L -o app.py https://huggingface.co/spaces/jeshwanth93/trainpy/resolve/main/app.py
376 Bytes
| from transformers import pipeline | |
| import gradio as gr | |
| generator = pipeline("text-generation", model="meta-llama/Llama-3-8B-Instruct") | |
| def chat_with_ai(message): | |
| output = generator(message, max_length=100, do_sample=True) | |
| return output[0]['generated_text'] | |
| demo = gr.Interface(fn=chat_with_ai, inputs="text", outputs="text", title="TrainPy Assistant") | |
| demo.launch() | |