QuranPlus / README.md
justdeen's picture
Update metadata with huggingface_hub
f2ad7d2 verified
metadata
license: apache-2.0
pipeline_tag: text-generation
tags:
  - transformers
  - text-generation
  - english
  - quran
  - islamic
  - religious-texts
  - question-answering
  - safetensors
  - t5
language:
  - en
library_name: transformers
widget:
  - text: What is Islam?
    example_title: Basic Question
  - text: Tell me about the five pillars of Islam
    example_title: Islamic Concepts
  - text: Explain the significance of prayer in Islam
    example_title: Religious Practice
inference: true

QuranPlus - English Language Islamic Q&A Model

This model is fine-tuned to answer questions about Islam and the Quran in English. While it has knowledge of Arabic religious texts and can reference them, it primarily operates in English for both input and output.

Model Details

  • Primary Language: English
  • Model Type: T5 (Text-to-Text Transfer Transformer)
  • Task: Question Answering about Islamic topics
  • Input: English questions about Islam, Quran, and Islamic teachings
  • Output: English responses with references to Islamic texts

Usage

You can ask questions in English and receive answers in English:

from transformers import T5ForConditionalGeneration, T5Tokenizer

model = T5ForConditionalGeneration.from_pretrained("justdeen/QuranPlus")
tokenizer = T5Tokenizer.from_pretrained("justdeen/QuranPlus")

# Ask questions in English
question = "What is the importance of charity in Islam?"
inputs = tokenizer(question, return_tensors="pt", max_length=512, truncation=True)
outputs = model.generate(**inputs, max_length=150)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)

Example Questions

  • "What is Islam?"
  • "Tell me about the five pillars of Islam"
  • "What does the Quran say about kindness?"
  • "Explain the concept of Tawheed"
  • "What is the significance of Ramadan?"

Note

While this model may reference Arabic terms and texts, it is designed to:

  • Accept questions in English
  • Provide responses in English
  • Explain Islamic concepts in English

The model has been trained to make Islamic knowledge accessible to English speakers.