Download app.py from sylviedc/basicAPI: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/spaces/sylviedc/basicAPI/resolve/main/app.py
- Command line
-
hf download hf://spaces/sylviedc/basicAPI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/sylviedc/basicAPI/resolve/main/app.py
422 Bytes
| import gradio as gr | |
| # Réponses factices pour démonstration | |
| def respond(message, history): | |
| history = history or [] | |
| # Réponse simple basée sur le message | |
| answer = f"Réponse démo à: {message}" | |
| # Ajouter la conversation sous forme de liste [user, bot] | |
| history.append([message, answer]) | |
| return "", history | |
| # Interface Gradio | |
| iface = gr.ChatInterface(respond, title="Chat Demo") | |
| iface.launch() | |