Spaces:
Runtime error
Runtime error
Download test_engine.py from SubZtep/ai-hello-world: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/SubZtep/ai-hello-world/resolve/main/test_engine.py
- Command line
-
hf download hf://spaces/SubZtep/ai-hello-world/test_engine.py
-
curl -L -o test_engine.py https://huggingface.co/spaces/SubZtep/ai-hello-world/resolve/main/test_engine.py
317 Bytes
| from ai_engine import generate | |
| history = [] | |
| while True: | |
| prompt = input("\nYou: ") | |
| response = generate(prompt, history) | |
| print(f"AI: {response}") | |
| history.append(f"User: {prompt}") | |
| history.append(f"AI: {response}") | |
| print("\nHistory so far:") | |
| for line in history: | |
| print(line) | |