Spaces:
Runtime error
Runtime error
Download app.py from TriVuse/Daxtin-ai-coder: direct link, hf CLI and curl.
- Browser
- Download file 435 Bytes
-
https://huggingface.co/spaces/TriVuse/Daxtin-ai-coder/resolve/main/app.py
- Command line
-
hf download hf://spaces/TriVuse/Daxtin-ai-coder/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TriVuse/Daxtin-ai-coder/resolve/main/app.py
435 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| # Load a free coding model | |
| generator = pipeline("text-generation", model="deepseek-ai/deepseek-coder-6.7b-instruct") | |
| def code_assistant(prompt): | |
| response = generator(prompt, max_length=512, do_sample=True, temperature=0.2) | |
| return response[0]['generated_text'] | |
| iface = gr.Interface(fn=code_assistant, inputs="text", outputs="text", title="Daxtin AI Coder") | |
| iface.launch() |