-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.py
More file actions
27 lines (20 loc) · 858 Bytes
/
quick_test.py
File metadata and controls
27 lines (20 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Quick single-text test for Ollama humanization"""
import ollama
text = "I gotta be sure every single time 'cause lives are on the line here. But sometimes, man, I just wonder if I'm good enough."
prompt = f"""Rewrite this text to sound completely natural and human-written.
Keep the same meaning. Add natural imperfections like contractions, varied sentences.
DON'T add any introduction - just give the rewritten text.
Original: {text}
Rewritten:"""
print("Testing Ollama with a single text...")
print(f"\nORIGINAL: {text}")
print("\nProcessing...")
response = ollama.generate(
model='llama3:8b',
prompt=prompt,
options={'temperature': 0.8, 'num_predict': 200}
)
result = response['response'].strip()
print(f"\nHUMANIZED: {result}")
print("\n✓ Success! Ollama is working correctly.")
print("Now you can run: python humanize_csv.py")