Downloads · 30 days
24
1% of all-time downloads
mrSoul7766/AgriQBot
AgriQBot is a machine learning model from mrSoul7766. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
Introducing AgriQBot 🌾🤖: Embarking on the journey to cultivate knowledge in agriculture! 🚜🌱 Currently in its early testing phase, AgriQBot is a multilingual small language model dedicated to agriculture. 🌍🌾 As w…
Downloads · 30 days
24
1% of all-time downloads
All-time downloads
2.2K
Public
Repo size
2.3 GB
Likes
3
Public
Click a slice to open those files.
.bin990 MB · 100%
From the Hugging Face model README
Introducing AgriQBot 🌾🤖: Embarking on the journey to cultivate knowledge in agriculture! 🚜🌱 Currently in its early testing phase, AgriQBot is a multilingual small language model dedicated to agriculture. 🌍🌾 As we harvest insights, the data generation phase is underway, and continuous improvement is the key. 🔄💡 The vision? Crafting a compact yet powerful model fueled by a high-quality dataset, with plans to fine-tune it for direct tasks in the future.
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text2text-generation", model="mrSoul7766/AgriQBot")
# Example user query
user_query = "How can I increase the yield of my potato crop?"
# Generate response
answer = pipe(f"Q: {user_query}", max_length=256)
# Print the generated answer
print(answer[0]['generated_text'])
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("mrSoul7766/AgriQBot")
model = AutoModelForSeq2SeqLM.from_pretrained("mrSoul7766/AgriQBot")
# Set maximum generation length
max_length = 256
# Generate response with question as input
input_ids = tokenizer.encode("Q: How can I increase the yield of my potato crop?", return_tensors="pt")
output_ids = model.generate(input_ids, max_length=max_length)
# Decode response
response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(response)