This project is a web-based AI assistant that allows users to summarize any given text in three formats — Paragraph, Keywords, or One Line — and optionally translate the summary into multiple languages. It’s built using React (with Next.js and Vercel deployment) and powered by Gemini API for text summarization and translation.
- Summarize text instantly using Gemini AI
- Three summary formats:
- Paragraph (default)
- Keywords
- One Line
- Translate summaries into different languages
- Dynamic format switching after initial summary
- Deployed and optimized for Vercel
-
When the user inputs a paragraph, the
getSummaryAPI triggers theSummarizefunction, which uses the Gemini API to summarize the input text. -
The default summary format is Paragraph. After receiving the initial summary, users can toggle between:
- Keywords
- One Line
- Paragraph
-
Changing the format triggers the
formatTextfunction, which calls theSummarizefunction again — this time with the updated format preference. -
Users can also select a language to translate the summary. This calls the
translateTextAPI (also powered by Gemini), which triggers theTranslatefunction. -
If no Gemini API key is provided, the app will fall back to
mockSummarizeandmockTranslatefunctions to simulate the summarization and translation process for testing purposes. -
To add support for more languages, modify the
language.jsfile located in/src/libs/.Example:
{ value: 'hi', language: 'Hindi' }
###Input
Large Language Models (LLMs) are advanced artificial intelligence systems trained on massive datasets of text to understand and generate human-like language. These models, such as GPT (Generative Pre-trained Transformer), use deep learning techniques—specifically transformer architectures—to learn patterns, context, grammar, and even nuance across billions of words. The training process involves unsupervised learning, where the model predicts the next word in a sentence, gradually developing a contextual understanding of language. As a result, LLMs can perform a wide array of language-based tasks: from answering questions, summarizing documents, and translating languages, to writing essays, generating code, and even engaging in creative writing. Their capabilities extend beyond simple syntax, as they can reason, infer, and adapt responses based on the input they receive. However, while LLMs are powerful, they are not infallible—they can hallucinate facts, reflect biases present in training data, or misinterpret ambiguous prompts. The ethical use of LLMs, including concerns around misinformation, privacy, and fairness, is a key area of ongoing research and discussion. As these models continue to evolve and become more integrated into everyday tools, they are shaping the future of human-computer interaction, pushing the boundaries of what machines can understand and produce in natural language.
Large Language Models (LLMs) are advanced AI systems trained on massive text data using deep learning, particularly transformer architecture, to understand and generate human-like language. They learn patterns and context through unsupervised training, enabling them to perform diverse tasks like summarizing, translating, writing, and even reasoning. While powerful, LLMs have limitations such as hallucinating facts and reflecting biases, raising important ethical considerations regarding their use and future integration into human-computer interaction.
Large Language Models, LLMs, Artificial Intelligence, deep learning, transformer architectures, massive datasets, unsupervised learning, language understanding, language generation, capabilities, limitations, ethical use, biases, hallucination, human-computer interaction
Large Language Models (LLMs) are advanced AI systems trained on vast text data to understand and generate human-like language, enabling diverse tasks and shaping human-computer interaction despite inherent limitations.
[Hindi translation] बड़े भाषा मॉडल (एलएलएम) उन्नत एआई सिस्टम हैं जिन्हें विशाल टेक्स्ट डेटा पर प्रशिक्षित किया जाता है ताकि मानव जैसी भाषा को समझा और उत्पन्न किया जा सके, जो विभिन्न कार्यों को सक्षम बनाता है और निहित सीमाओं के बावजूद मानव-कंप्यूटर इंटरैक्शन को आकार देता है।
🔗 AI Paragraph Summarizer – Live Site
AI-paragraph-summarizer ├── public ├── src │ ├── app │ │ ├── api │ │ │ └── ask-ai │ │ │ └── route.js │ │ ├── global.css │ │ ├── layout.js │ │ └── page.js │ │ │ ├── components │ │ ├── chats │ │ │ ├── ChatHistory.jsx │ │ │ ├── ChatInput.jsx │ │ │ ├── LanguageSelector.jsx │ │ │ └── Message.jsx │ │ │ │ │ ├── ui │ │ │ ├── button.jsx │ │ │ ├── LoadingDots.jsx │ │ │ └── textarea.jsx │ │ │ │ │ └── ChatContainer.jsx │ │ │ └── libs │ ├── api.js │ ├── language.js │ └── utils.js
Follow these steps to run the project on your local machine:
git clone https://github.com/snowxx456/AI-paragraph-summarizer.git
cd AI-paragraph-summarizerOr download the ZIP and extract it.
npm installEdit the .env.local file in the root folder and add your Gemini API Key:
GEMINI_API_KEY=your_gemini_api_key_hereYou can get your Gemini API key from ai.google.dev
npm run devOpen http://localhost:3000 in your browser.
- Next.js 15
- React + Hooks
- Tailwind CSS
- Google Gemini API (@google/generative-ai)
- Vercel for hosting
