Spaces:
Configuration error
Configuration error
Download app.py from Julian-AI-Organization/README: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/spaces/Julian-AI-Organization/README/resolve/main/app.py
- Command line
-
hf download hf://spaces/Julian-AI-Organization/README/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Julian-AI-Organization/README/resolve/main/app.py
398 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| # Load Hugging Face model | |
| chatbot = pipeline("text-generation", model="gpt2") # Replace with your chosen model | |
| def respond(message, history): | |
| response = chatbot(message, max_length=100)[0]['generated_text'] | |
| return response | |
| # Gradio interface | |
| demo = gr.ChatInterface(fn=respond, title="Julian AI Organization Chatbot") | |
| demo.launch() | |