Download chat_server.py from Mummar/lstm: direct link, hf CLI and curl.
- Browser
- Download file 255 Bytes
-
https://huggingface.co/spaces/Mummar/lstm/resolve/main/chat_server.py
- Command line
-
hf download hf://spaces/Mummar/lstm/chat_server.py
-
curl -L -o chat_server.py https://huggingface.co/spaces/Mummar/lstm/resolve/main/chat_server.py
255 Bytes
| from langserve import RemoteRunnable | |
| from langchain_core.output_parsers import StrOutputParser | |
| llm = RemoteRunnable("http://0.0.0.0:9012/basic_chat/") | StrOutputParser() | |
| for token in llm.stream("Hello World! How is it going?"): | |
| print(token, end='') | |