Spaces:
Runtime error
Runtime error
#!/usr/bin/env python3 | |
""" | |
Quick test of Ollama with a simple prompt | |
""" | |
import ollama | |
def quick_test(): | |
print("π Quick Ollama test...") | |
try: | |
# Very simple test | |
response = ollama.generate( | |
model='llama2', | |
prompt='Say "Hello" in one word only.' | |
) | |
print(f"β Response: {response['response']}") | |
return True | |
except Exception as e: | |
print(f"β Failed: {e}") | |
return False | |
if __name__ == "__main__": | |
quick_test() | |