{"id":15135908,"url":"https://github.com/rsn601kri/gemini-chatbot","last_synced_at":"2026-01-18T19:02:05.038Z","repository":{"id":251757671,"uuid":"837952997","full_name":"RSN601KRI/Gemini-Chatbot","owner":"RSN601KRI","description":"Chatbot using The chatbot leverages the capabilities of large language models to engage in meaningful conversations and provide responses to user queries. The guide covers the setup of your development environment, coding the Streamlit application, and deploying the chatbot on Streamlit ","archived":false,"fork":false,"pushed_at":"2024-08-05T13:25:57.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T23:29:06.764Z","etag":null,"topics":["ai","llm","ml","pycharm","python","streamlit-webapp"],"latest_commit_sha":null,"homepage":"https://geminichatbotx.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RSN601KRI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-04T14:32:43.000Z","updated_at":"2024-08-06T01:15:58.000Z","dependencies_parsed_at":"2024-08-05T15:27:11.887Z","dependency_job_id":"d1dead03-ef1a-4812-ae7b-004b41bd5f3e","html_url":"https://github.com/RSN601KRI/Gemini-Chatbot","commit_stats":null,"previous_names":["rsn601kri/gemini-chatbot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSN601KRI%2FGemini-Chatbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSN601KRI%2FGemini-Chatbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSN601KRI%2FGemini-Chatbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSN601KRI%2FGemini-Chatbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RSN601KRI","download_url":"https://codeload.github.com/RSN601KRI/Gemini-Chatbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415783,"owners_count":20935383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llm","ml","pycharm","python","streamlit-webapp"],"created_at":"2024-09-26T06:01:36.821Z","updated_at":"2026-01-18T19:02:05.025Z","avatar_url":"https://github.com/RSN601KRI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here’s a sample `README.md` file for your project:\n\n---\n\n# Chatbot with Google’s Gemini Pro and Streamlit\n\n## Overview\n\nThis project demonstrates how to build a chatbot using Google’s Gemini Pro API and deploy it with Streamlit. The chatbot leverages the capabilities of large language models to engage in meaningful conversations and provide responses to user queries. The guide covers the setup of your development environment, coding the Streamlit application, and deploying the chatbot on Streamlit Cloud.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Getting Started](#getting-started)\n- [Setting Up the Development Environment](#setting-up-the-development-environment)\n- [Writing the Streamlit Application](#writing-the-streamlit-application)\n- [Testing the Application Locally](#testing-the-application-locally)\n- [Deploying Your Chatbot on Streamlit Cloud](#deploying-your-chatbot-on-streamlit-cloud)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nLarge Language Models (LLMs) like Google’s Gemini Pro can understand and generate human-like text, making them ideal for chatbot development. Streamlit allows for easy creation of interactive web applications. This guide will help you integrate these technologies to build and deploy a functional chatbot.\n\n## Getting Started\n\n1. **Obtain an API Key from Google Gemini Pro:**\n   - Visit [Google AI Studio](https://ai.google).\n   - Create a new project.\n   - Generate an API key.\n   - Save the API key securely.\n\n2. **Set Up Your Development Environment:**\n   - Install Python on your machine.\n   - Set up a virtual environment using `venv`.\n   - Install necessary libraries with `pip`.\n\n## Setting Up the Development Environment\n\nCreate a project structure with the following files:\n\n- `main.py`: The main application file.\n- `requirements.txt`: Lists all dependencies.\n- `.env`: Stores your API key.\n\nInstall the required libraries:\n\n```bash\npip install streamlit python-dotenv google-generative-ai\n```\n\nLink Demo: https://vimeo.com/995034103/ff144ac6da\n\n## Writing the Streamlit Application\n\n1. **Import Required Libraries**:\n\n   ```python\n   import streamlit as st\n   import os\n   from dotenv import load_dotenv\n   from google.generative_ai import ChatGPT\n   ```\n\n2. **Load Environment Variables**:\n\n   ```python\n   load_dotenv()\n   API_KEY = os.getenv(\"GOOGLE_API_KEY\")\n   ```\n\n3. **Configure the Streamlit App**:\n\n   ```python\n   st.set_page_config(page_title=\"Chat with Gemini Pro\", page_icon=\"🧠\", layout=\"centered\")\n   ```\n\n4. **Create Chat Functionality**:\n\n   ```python\n   def get_response(prompt):\n       response = ChatGPT.generate_response(prompt, api_key=API_KEY)\n       return response\n   ```\n\n5. **Maintain Chat History**:\n\n   ```python\n   if \"history\" not in st.session_state:\n       st.session_state.history = []\n   ```\n\n6. **Display Chat Messages**:\n\n   ```python\n   for msg in st.session_state.history:\n       st.write(msg)\n   ```\n\n7. **Create User Input Field**:\n\n   ```python\n   user_input = st.text_input(\"Ask Gemini Pro:\")\n   if user_input:\n       response = get_response(user_input)\n       st.session_state.history.append(f\"You: {user_input}\")\n       st.session_state.history.append(f\"Gemini Pro: {response}\")\n   ```\n\n## Testing the Application Locally\n\nRun your application locally with:\n\n```bash\nstreamlit run main.py\n```\n\nNavigate to the provided local URL in your web browser to interact with your chatbot.\n\n## Deploying Your Chatbot on Streamlit Cloud\n\n1. **Create a Public Repository on GitHub:**\n   - Upload your project files.\n   - Ensure the `.env` file is configured correctly.\n\n2. **Deploy on Streamlit Cloud:**\n   - Sign in to Streamlit Cloud using your GitHub account.\n   - Create a new app and link it to your GitHub repository.\n   - Deploy the app and wait for the process to complete.\n\n   After deployment, you will receive a URL to access your chatbot online.\n\n## Contributing\n\nFeel free to contribute to this project by submitting issues or pull requests. Your feedback and suggestions are welcome.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsn601kri%2Fgemini-chatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsn601kri%2Fgemini-chatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsn601kri%2Fgemini-chatbot/lists"}