Downloads · 30 days
9
24% of all-time downloads
untiltomorrow/bert-mlg
bert-mlg is a question answering model from untiltomorrow. Use it when the input is a question plus a passage. The card lists the license as mit.
This is a fine-tuned model for question-answering on the SQuAD dataset.
Downloads · 30 days
9
24% of all-time downloads
All-time downloads
37
Public
Parameters
109M
874 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
This is a fine-tuned model for question-answering on the SQuAD dataset.
This model is fine-tuned for question-answering (QA) tasks. It was trained on a custom dataset to answer questions related to the city of Malang in Indonesia.
This model is based on the BERT architecture and has been fine-tuned for question-answering on a custom set of questions related to Malang, such as its famous landmarks, universities, and tourism destinations.
The model is fine-tuned for the question-answering task, which takes a context (paragraph) and a question as input and provides an answer based on the context.
This model is intended for answering questions about the city of Malang. It can be used for applications such as:
To use this model with Hugging Face's transformers library, follow these steps:
const axios = require("axios");
const HF_API_URL = "https://api-inference.huggingface.co/models/untiltomorrow/bert-mlg";
const HF_API_TOKEN = "YOUR_HUGGING_FACE_TOKEN";
async function askModel(question, context) {
try {
const response = await axios.post(
HF_API_URL,
{
inputs: { question, context },
},
{
headers: { Authorization: `Bearer ${HF_API_TOKEN}` },
}
);
console.log("Model's response:", response.data);
} catch (error) {
console.error("Error:", error.response ? error.response.data : error.message);
}
}
// Example Usage:
const context = "Malang is a city in East Java, Indonesia, known for its cool climate and apple cultivation.";
const question = "What is Malang known for?";
askModel(question, context);