This repository contains the content of Inquisitive: generative artificial intelligence powered quiz generator.
Our client, NewsSphere, is a leading news organization dedicated to expanding its global reach and enhancing audience engagement. With a vast amount of content published daily in multiple languages, the organization faces the considerable challenge of manually creating quizzes and assessments for each article. This process is not only time-consuming but also prone to inconsistencies across different languages and cultural contexts.
- The project is AI-driven multilingual question generator which creates quizzes from any text/news articles in any language.
- The project incorporates language detection, machine translation, and a large language model (LLM) for accurate and contextually relevant quiz generation.
- It utilizes the Gemini-API to create quizzes based on the given text context. In cases where the user inputs a topic instead of a large text, a paragraph is first provided for user comprehension, and then the quiz is generated based on it.
- Users' submissions are recorded, and results are generated. A detailed analysis section allows users to review their performance and submissions. The sleek and user-friendly interface, is made with Streamlit which ensures a smooth and engaging user-experience.
-
User Input:
User submits a topic or news article in any language. -
Quiz Customizations:
User can customize the quiz based on number of questions, difficulty level and requirement of hints.
-
Paragraph Generation:
In cases where the user inputs a topic instead of a large text, a paragraph is first provided for user comprehension. -
Language Detection:
The app utilizes the Translation API to detect the language of the submitted content. -
Translation to English:
If the content is not in English, the app translates it into English using the Translation API. -
Question Generation:
The app calls the Gemini API to generate diverse and contextually relevant questions based on the input. -
Translation Back:
The generated questions are translated back into the original language of the news article using the Translation API. -
Output:
The app presents the questions in the original language to the user in interactive format. -
Quiz:
User can now answer the various types of the questions generated like MCQ, Multiple Correct, Numerical type and True / False. -
Evaluation:
Once quiz is submitted ✅, submissions are checked for correctness. -
Analysis:
All the questions and answers can be analyzed in provided result analysis section.
- Python
- Streamlit (Python)
- Langdetect (python)
- Gemini API
- Visit the deployed project on Streamlit Community Cloud:
Deployment Link
-
Clone the repository:
git clone https://github.com/Bbs1412/Inquisitive_GenAI_quiz cd Inquisitive_GenAI_quiz
-
Create and activate python environment:
python -m venv env .\env\Scripts\activate
-
Install the required libraries:
pip install -r requirements.txt
-
Generate Gemini-API key:
You need a Gemini API key to generate the content using Google's GenAI. -
Create a file 'api.env' in current directory and save the API-key in it:
API="your_key"
-
Run the app:
streamlit run app.py
Any contributions to this repo or suggestions are welcome!
- Email - [email protected]