Download app.py from dunglc/HRDC: direct link, hf CLI and curl.
- Browser
- Download file 413 Bytes
-
https://huggingface.co/spaces/dunglc/HRDC/resolve/main/app.py
- Command line
-
hf download hf://spaces/dunglc/HRDC/app.py
-
curl -L -o app.py https://huggingface.co/spaces/dunglc/HRDC/resolve/main/app.py
413 Bytes
| import gradio as gr | |
| from transformers import pipeline | |
| # Dùng mô hình pre-trained phù hợp trả lời tự nhiên | |
| chatbot = pipeline("text-generation", model="microsoft/DialoGPT-medium") | |
| def respond(message): | |
| response = chatbot(message, max_length=100, num_return_sequences=1) | |
| return response[0]['generated_text'] | |
| gr.ChatInterface(fn=respond, title="Chatbot HR Quacontrol", theme="soft").launch() | |