mrSoul7766
commited on
Commit
•
cfe0d91
1
Parent(s):
71708c5
Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ pipe = pipeline("text2text-generation", model="mrSoul7766/AgriQBot")
|
|
28 |
# Example user query
|
29 |
user_query = "How can I increase the yield of my potato crop?"
|
30 |
# Generate response
|
31 |
-
answer = pipe(f"Q: {user_query}", max_length=
|
32 |
# Print the generated answer
|
33 |
print(answer[0]['generated_text'])
|
34 |
```
|
@@ -41,7 +41,7 @@ tokenizer = AutoTokenizer.from_pretrained("mrSoul7766/AgriQBot")
|
|
41 |
model = AutoModelForSeq2SeqLM.from_pretrained("mrSoul7766/AgriQBot")
|
42 |
|
43 |
# Set maximum generation length
|
44 |
-
max_length =
|
45 |
|
46 |
# Generate response with question as input
|
47 |
input_ids = tokenizer.encode("Q: How can I increase the yield of my potato crop?", return_tensors="pt")
|
|
|
28 |
# Example user query
|
29 |
user_query = "How can I increase the yield of my potato crop?"
|
30 |
# Generate response
|
31 |
+
answer = pipe(f"Q: {user_query}", max_length=256)
|
32 |
# Print the generated answer
|
33 |
print(answer[0]['generated_text'])
|
34 |
```
|
|
|
41 |
model = AutoModelForSeq2SeqLM.from_pretrained("mrSoul7766/AgriQBot")
|
42 |
|
43 |
# Set maximum generation length
|
44 |
+
max_length = 256
|
45 |
|
46 |
# Generate response with question as input
|
47 |
input_ids = tokenizer.encode("Q: How can I increase the yield of my potato crop?", return_tensors="pt")
|