diff --git a/README.md b/README.md index 9ba6241da..86dd9493b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # llama.cpp +![llama](https://user-images.githubusercontent.com/1991296/227761327-6d83e30e-2200-41a6-bfbb-f575231c54f4.png) + [![Actions Status](https://github.com/ggerganov/llama.cpp/workflows/CI/badge.svg)](https://github.com/ggerganov/llama.cpp/actions) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) diff --git a/examples/main/main.cpp b/examples/main/main.cpp index 9af8a7405..e9478d541 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -450,7 +450,10 @@ int main(int argc, char ** argv) { std::string line; bool another_line = true; do { - std::getline(std::cin, line); + if (!std::getline(std::cin, line)) { + // input stream is bad or EOF received + return 0; + } if (line.empty() || line.back() != '\\') { another_line = false; } else {