<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sampath Kumar Maddula</title>
    <description>The latest articles on DEV Community by Sampath Kumar Maddula (@sampathm).</description>
    <link>https://dev.to/sampathm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2899774%2F82256167-a9fd-4dee-b18b-b7b4ef6f5c68.png</url>
      <title>DEV Community: Sampath Kumar Maddula</title>
      <link>https://dev.to/sampathm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sampathm"/>
    <language>en</language>
    <item>
      <title>Master Your Workflow: Top Gemini CLI Commands You Should Know | Gemini CLI CheatSheet</title>
      <dc:creator>Sampath Kumar Maddula</dc:creator>
      <pubDate>Fri, 30 Jan 2026 07:02:00 +0000</pubDate>
      <link>https://dev.to/sampathm/master-your-workflow-top-gemini-cli-commands-you-should-know-gemini-cli-cheatsheet-3l9o</link>
      <guid>https://dev.to/sampathm/master-your-workflow-top-gemini-cli-commands-you-should-know-gemini-cli-cheatsheet-3l9o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Picture this&lt;/strong&gt; : you’re deep in your coding workflow. You need to refactor a complex function, write a clear and concise commit message for your latest changes, and then figure out an obscure shell command to deploy your work. Each task requires switching context — moving from your editor to a browser, then to your Git client, and back again. It’s a constant juggling act that breaks your focus.&lt;/p&gt;

&lt;p&gt;What if you could do all of this from one place, your terminal? The &lt;a href="https://github.com/google-gemini/gemini-cli" rel="noopener noreferrer"&gt;Gemini CLI&lt;/a&gt; brings the power of Google’s state-of-the-art AI directly to your command line, acting as a seamless, context-aware pair programmer. It’s designed to understand your project, streamline your tasks, and keep you in the flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Getting Started: Your First Steps
&lt;/h3&gt;

&lt;p&gt;Before you can master your workflow, you need to get set up and oriented. These commands are the foundation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;/init&lt;/strong&gt; 🎬: This is where your journey should begin. Running /init in your project directory allows Gemini to analyze your codebase and create a GEMINI.md file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/about&lt;/strong&gt; ℹ️: Curious about your setup? This command quickly displays your Gemini CLI version, the underlying model being used, and your current authentication method.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/auth&lt;/strong&gt; 🔑: Security and access are paramount. The /auth command lets you configure how you authenticate with Google's AI services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/help &amp;amp; /docs&lt;/strong&gt; 📚: The /help command is your go-to for a quick overview. For more details, /docs opens the full documentation in your browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/quit&lt;/strong&gt; 👋: When you’re done for the day, simply use /quit to exit the Gemini CLI application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🛠️ Core Workflow Commands
&lt;/h3&gt;

&lt;p&gt;These are the commands you’ll use day-to-day to interact with Gemini and your codebase.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;! &lt;strong&gt;(Shell Commands)&lt;/strong&gt; 🐚: This is one of the most powerful features. Press SHIFT + 1 to enter "shell mode," allowing you to execute shell commands or describe them in natural language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/tools&lt;/strong&gt; 🧰: Ever wonder what capabilities Gemini has? The /tools command lists all available tools Gemini can use to help you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/editor&lt;/strong&gt; ✍️: &lt;strong&gt;Pro-Tip:&lt;/strong&gt; For complex, multi-line prompts, use /editor to set your preferred external editor (like Vim or VS Code), then use Ctrl+X to open it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💬 Managing Your Conversations
&lt;/h3&gt;

&lt;p&gt;A conversation with Gemini is a valuable asset. Here’s how to manage it effectively.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;/chat (save, resume, list, delete, share)&lt;/strong&gt; 💾: The /chat command is a powerful tool for managing your session history. save a conversation, resume it later, or share it as a file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/clear&lt;/strong&gt; 🧹: Need a fresh start? /clear will wipe the screen and your current conversation history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/compress&lt;/strong&gt; 🧠: When a conversation gets long, /compress intelligently summarizes the context to keep things focused.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎨 Customization and Stats
&lt;/h3&gt;

&lt;p&gt;Tailor the CLI to your liking and keep an eye on your usage.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;/theme&lt;/strong&gt; 🖌️: Customize your experience. The /theme command allows you to change the look and feel of the Gemini CLI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/stats&lt;/strong&gt; 📊: Curious about your usage? /stats provides statistics for your current session, including model and tool usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⌨️ Gemini CLI Keyboard Shortcuts You Should Know
&lt;/h3&gt;

&lt;p&gt;To work even faster, it’s worth learning a few essential keyboard shortcuts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ESC: Cancel a long-running task or clear your input.&lt;/li&gt;
&lt;li&gt;Ctrl+C: Quit the application (press twice).&lt;/li&gt;
&lt;li&gt;Ctrl+X &lt;strong&gt;/&lt;/strong&gt; Meta+Enter: Open your input in an external editor.&lt;/li&gt;
&lt;li&gt;Enter: Send your query to Gemini.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Common Use Cases to Try Today
&lt;/h3&gt;

&lt;p&gt;Here are a few practical ideas to get you started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quick Refactoring:&lt;/strong&gt; Use @ to provide a file as context (e.g., &lt;a class="mentioned-user" href="https://dev.to/src"&gt;@src&lt;/a&gt;/utils.py) and ask Gemini: "Refactor the calculate_total function in this file to be more readable."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit Message Generation:&lt;/strong&gt; Run !git diff --staged and then ask Gemini: "Based on the diff, write a conventional commit message."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command-Line Coach:&lt;/strong&gt; Paste a complex shell command and ask: tar -xzvf archive.tar.gz "What do each of these flags do?"
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;╭───────────────────────────────────────────────────────────────────────────╮
│ &amp;gt; tar -xzvf archive.tar.gz what does each flag do │
╰───────────────────────────────────────────────────────────────────────────╯

✦ Of course. The command tar -xzvf archive.tar.gz is used to decompress and extract files from a gzipped tar archive.

  Here is a breakdown of what each flag does:

   * -x: eXtract. This tells tar to get files out of the archive.
   * -z: gZip. This tells tar to decompress the archive using gzip. This is necessary for files ending in .gz.
   * -v: Verbose. This makes tar list each file as it is being extracted, so you can see the progress.
   * -f: File. This flag must be followed by the name of the archive file you want to process (in this case, archive.tar.gz).

  You can think of the command as saying: "eXtract the gZipped contents Verbosely from the File named archive.tar.gz."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🎉 Takeaway: You’re One Step Ahead!
&lt;/h3&gt;

&lt;p&gt;Congratulations on making it through this guide! By familiarizing yourself with these commands and workflows, you’re already one step ahead of many developers who might not be tapping into the full potential of having an AI assistant directly in their terminal.&lt;/p&gt;

&lt;p&gt;Thank you for investing the time to level up your skills. We encourage you to start integrating these commands into your daily routine. You’ll be surprised at how much time you can save and how much more you can accomplish.&lt;/p&gt;

&lt;p&gt;Now we’d love to hear from you! What new command did you learn that you’re most excited to try? Share your thoughts in the comments below!&lt;/p&gt;




</description>
      <category>cheatsheet</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Gemini 2.5 Flash vs. Gemini 2.0 Flash: A New Era for AI Image Generation</title>
      <dc:creator>Sampath Kumar Maddula</dc:creator>
      <pubDate>Thu, 04 Sep 2025 18:20:22 +0000</pubDate>
      <link>https://dev.to/sampathm/gemini-25-flash-vs-gemini-20-flash-a-new-era-for-ai-image-generation-2n02</link>
      <guid>https://dev.to/sampathm/gemini-25-flash-vs-gemini-20-flash-a-new-era-for-ai-image-generation-2n02</guid>
      <description>&lt;p&gt;Google has once again pushed the boundaries of generative AI with the release of Gemini 2.5 Flash Image (Preview), a significant upgrade to its predecessor, Gemini 2.0 Flash Image. While both models offer impressive image generation capabilities, Gemini 2.5 Flash introduces a suite of new features and enhancements that provide you with unprecedented creative control and higher-quality outputs. In this blog post, we will delve into the key differences between these two models, highlighting the advancements that make Gemini 2.5 Flash a game-changer for creators and developers.&lt;/p&gt;

&lt;p&gt;(If you prefer, you can also read this post in &lt;a href="https://medium.com/google-cloud/gemini-2-5-flash-vs-gemini-2-0-flash-a-new-era-for-ai-image-generation-e2a08fc5d82b" rel="noopener noreferrer"&gt;Medium&lt;/a&gt; | &lt;a href="https://dev.to/sampathm/gemini-25-flash-vs-gemini-20-flash-a-new-era-for-ai-image-generation-2n02"&gt;Dev.to&lt;/a&gt; | &lt;a href="https://msampathkumar.github.io/blog/2025/09/04/gemini-25-flash-vs-gemini-20-flash-a-new-era-for-ai-image-generation/" rel="noopener noreferrer"&gt;Github)&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Advancements in Gemini 2.5 Flash
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Conversational Editing and Iterative Refinement: One of the most significant improvements in Gemini 2.5 Flash is its ability to engage in conversational editing. This means you can now refine and edit images through a natural language dialogue. Instead of starting from scratch with a new prompt for every minor adjustment, you can provide iterative feedback. For instance, you can ask the model to "make the sky a deeper blue" or "add a dog in the background," and it will make the changes while preserving the rest of the image. This feature was more limited in Gemini 2.0, making the creative process in 2.5 much more fluid and intuitive.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdycg6e9btka6s92xv4n1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdycg6e9btka6s92xv4n1.png" alt="Image Generated &amp;amp; exited using Text Prompts" width="768" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multi-Image Fusion and Composition: Gemini 2.5 Flash introduces multi-image fusion, a powerful feature that allows you to combine up to three images to create a single, seamless visual. This opens up a world of creative possibilities, from placing a product in a new environment to creating surrealist art. While Gemini 2.0 had some capabilities in this area, 2.5 takes it a step further with more sophisticated blending and composition, resulting in more photorealistic and coherent images.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3a0y3j0ij9qf4fkcrni3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3a0y3j0ij9qf4fkcrni3.png" alt="Image updated using other images as referrence" width="712" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Character and Style Consistency: Maintaining a consistent character or style across multiple images has always been a challenge for AI image generators. Gemini 2.5 Flash addresses this with enhanced character and style consistency. You can now generate images of the same character in different scenes, outfits, or poses, and the model will maintain their key features and appearance. This is a massive leap forward for storytelling, branding, and any application that requires a consistent visual identity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved Visual Quality(Aspect ratio) and Text Rendering: Gemini 2.5 Flash boasts a noticeable improvement in overall visual quality. The images generated are more detailed, vibrant, and photorealistic than those from Gemini 2.0. Furthermore, the model's ability to render text within images has been significantly enhanced. This means you can create posters, invitations, and other designs with clear, legible text, a task that was often a struggle for previous models.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rceocr9l0cwutwrzojr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1rceocr9l0cwutwrzojr.png" alt="Image generated after 5 prompts" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the link to download above image: &lt;a href="https://msampathkumar.github.io/blog/gemini-2.5-flash-image-preview-final-download.png" rel="noopener noreferrer"&gt;https://msampathkumar.github.io/blog/gemini-2.5-flash-image-preview-final-download.png&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Verdict: A Leap Forward in Creative Control&lt;br&gt;
While Gemini 2.0 Flash was a powerful tool in its own right, Gemini 2.5 Flash represents a significant evolution in AI image generation. The introduction of conversational editing, multi-image fusion, and enhanced consistency gives creators an unparalleled level of control over the final output. These advancements, combined with the improvements in visual quality and text rendering, make Gemini 2.5 Flash an indispensable tool for anyone looking to push the boundaries of their creativity. As AI-powered image generation continues to evolve, Gemini 2.5 Flash has set a new standard for what's possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash#image" rel="noopener noreferrer"&gt;Gemini 2.5 Flash Image Preview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-0-flash#image-generation" rel="noopener noreferrer"&gt;Gemini 2.0 Flash Image&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>google</category>
      <category>cloud</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Google Cloud's GKE tops 2025 Magic Quadrant for Container Management</title>
      <dc:creator>Sampath Kumar Maddula</dc:creator>
      <pubDate>Mon, 25 Aug 2025 12:25:56 +0000</pubDate>
      <link>https://dev.to/sampathm/google-clouds-gke-tops-2025-magic-quadrant-for-container-management-ii7</link>
      <guid>https://dev.to/sampathm/google-clouds-gke-tops-2025-magic-quadrant-for-container-management-ii7</guid>
      <description>&lt;p&gt;Thrilled to share that for the third year in a row, Gartner has recognized Google as a Leader in the 2025 Magic Quadrant for Container Management! 🎉&lt;/p&gt;

&lt;p&gt;As someone who loves working with Google Cloud, GKE has always been a personal favorite of mine, right up there with GCLB and Gemini. It's fantastic to see this powerful tool get the recognition it deserves.&lt;/p&gt;

&lt;p&gt;For me, GKE is a game-changer for container orchestration, making it so much easier to manage and scale containerized applications. It's a key part of modernizing our infrastructure and embracing a cloud-native approach.&lt;/p&gt;

&lt;p&gt;Check out the full report here: &lt;a href="https://cloud.google.com/blog/products/containers-kubernetes/2025-gartner-magic-quadrant-for-container-management-leader" rel="noopener noreferrer"&gt;https://cloud.google.com/blog/products/containers-kubernetes/2025-gartner-magic-quadrant-for-container-management-leader&lt;/a&gt;&lt;/p&gt;

</description>
      <category>google</category>
      <category>cloudcomputing</category>
      <category>gke</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Learn how to create a chatbot and deploy to Cloud in few mins.</title>
      <dc:creator>Sampath Kumar Maddula</dc:creator>
      <pubDate>Thu, 10 Jul 2025 15:04:26 +0000</pubDate>
      <link>https://dev.to/sampathm/learn-how-to-create-a-chatbot-and-deploy-to-cloud-in-few-mins-1aco</link>
      <guid>https://dev.to/sampathm/learn-how-to-create-a-chatbot-and-deploy-to-cloud-in-few-mins-1aco</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki" class="crayons-story__hidden-navigation-link"&gt;How to build &amp;amp; deploy a simple Streamlit chatbot using Gemini 2.5 Flash Lite&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/sampathm" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2899774%2F82256167-a9fd-4dee-b18b-b7b4ef6f5c68.png" alt="sampathm profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/sampathm" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Sampath Kumar Maddula
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Sampath Kumar Maddula
                
              
              &lt;div id="story-author-preview-content-2671275" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/sampathm" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2899774%2F82256167-a9fd-4dee-b18b-b7b4ef6f5c68.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Sampath Kumar Maddula&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 9 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki" id="article-link-2671275"&gt;
          How to build &amp;amp; deploy a simple Streamlit chatbot using Gemini 2.5 Flash Lite
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gemini"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gemini&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/streamlit"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;streamlit&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/googlecloud"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;googlecloud&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>gemini</category>
      <category>streamlit</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>How to build &amp; deploy a simple Streamlit chatbot using Gemini 2.5 Flash Lite</title>
      <dc:creator>Sampath Kumar Maddula</dc:creator>
      <pubDate>Wed, 09 Jul 2025 10:24:49 +0000</pubDate>
      <link>https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki</link>
      <guid>https://dev.to/sampathm/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-25-flash-lite-14ki</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;In this blog post, I will show you how to use the Gemini Flash model to build a chatbot using Streamlit. Compared to my previous post in Medium.com, here I use the latest version of Streamlit and also the new Google GenAI SDK.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Google has offered Gemini Models services in 2 -3 different ways. For those who are following regular updates, these are easy to grasp, but for the general crowd this has become a slight challenge due to the rapid changes and updates in AI/LLM topics.&lt;/p&gt;

&lt;p&gt;Personally, I have felt that AI updates are like unexpected storms 🌪️. So here is the short version. From a programmer’s lens 🧐, Google offered Gemini Models access in 3️⃣ ways: (1) Google AI Studio API Keys (2) Google Cloud Project — Application Default Credentials (ADC) (3) Google Cloud Gemini API keys.&lt;/p&gt;

&lt;p&gt;(Off-topic: I have used all these 3️⃣ ways and I find using Google Cloud ADC is my preferred option. This is because it is easy to use and feels more secure than others. In production environments, I prefer to use Terraform code to update my service accounts to have the required credentials.)&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://pypi.org/project/google-genai" rel="noopener noreferrer"&gt;Google-GenAI SDK&lt;/a&gt; acts as a standalone SDK for all these 3️⃣ ways of accessing Gemini Models. Also switching the access methods takes only a 2–3 lines of code. If you like to use ENVIRONMENT variables, or a .env file then your code becomes more portable. To learn more about, check &lt;a href="https://github.com/googleapis/python-genai/" rel="noopener noreferrer"&gt;https://github.com/googleapis/python-genai/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now lets start with build Streamlit chatbot with Gemini 2.5. I have already written the necessary code in Github.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download the code&lt;/strong&gt;&lt;br&gt;
Source: &lt;a href="https://github.com/GoogleCloudPlatform/devrel-demos/tree/main/ai-ml/gemini-chatbot-app/lesson03" rel="noopener noreferrer"&gt;https://github.com/GoogleCloudPlatform/devrel-demos/tree/main/ai-ml/gemini-chatbot-app/lesson03&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com:GoogleCloudPlatform/devrel-demos.git
cd devrel-demos/ai-ml/gemini-chatbot-app/lesson03
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a virtual environment to install dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you like to use UV, then&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uv venv
uv add -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Mandatory steps to access Gemini Models from your Google Cloud Project.&lt;/strong&gt;&lt;br&gt;
I have installed the Gcloud tool and used Application Default Credentials to get the credentials.&lt;/p&gt;

&lt;p&gt;If you want to run the code in Google Cloud project, then you need to update respective service-account with the required permissions. For details, check out this user-managed service account article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run the code (locally in CLI)&lt;/strong&gt;&lt;br&gt;
Let’s run the code locally using the python command. This allows you to have a quick chat with Gemini from CLI and also allows you to do pre-check for the Streamlit Web application to authenticate and get the response from the Gemini Model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python llm.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Samples Logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(venv) sampath:lesson03 sampathm$ python llm.py 
Chat session ID: 4563963584
Enter your question (or 'exit' to quit)
User: Hi there
Model: Hello! 👋 How can I help you today?
User: exit
Exiting the chat session. Goodbye!
(venv) sampath:lesson03 sampathm$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the Application (locally in Google Chrome)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;streamlit run streamlit_app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Samples Logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(venv) sampath:lesson03 sampathm$ streamlit run streamlit_app.py
 You can now view your Streamlit app in your browser.
  Local URL: http://localhost:8501
  Network URL: http://192.0.0.2:8501
  For better performance, install the Watchdog module:
  $ xcode-select --install
  $ pip install watchdog

Chat session ID: 4604152912
2025-07-07 18:54:50,592 - INFO - New chat session initialized.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Deploy the app to Cloud RUN&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash deploy.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example Logs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(venv) sampath:lesson03 sampathm$ bash deploy.sh 
Building using Buildpacks and deploying container to Cloud Run service [simple-app] in project [...] region [europe-north1]
⠹ Building and deploying... Uploading sources.                                                      
  ⠹ Uploading sources...                                                                            
  . Building Container...                                                                           
✓ Building and deploying... Done.                                                                   
  ✓ Uploading sources...                                                                            
  ✓ Building Container... Logs are available at [https://console.cloud.google.com/cloud-build/builds
  ;region=europe-north1/XXXX-XXX-XXXX-XXXX-XXXX?project=0001110001110].                 
  ✓ Creating Revision...                                                                            .
  ✓ Routing traffic...                                                                              
  ✓ Setting IAM Policy...                                                                           
Done.                                                                                               
Service [simple-app] revision [simple-app-00004-hs7] has been deployed and is serving 100 percent of traffic.
Service URL: https://simple-app-0001110001110.europe-north1.run.app
(venv) sampath:lesson03 sampathm$
(venv) sampath:lesson03 sampathm$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wether you deploy to Cloud Run or run locally, here is a preview of the application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chatbot Preview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6f8uaaz120lcqqyt5gv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6f8uaaz120lcqqyt5gv.webp" alt="Chatbot Preview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have reached this far, then I believe you have successfully deployed your Chatbot web application on Google Cloud Platform.&lt;/p&gt;

&lt;p&gt;Congratulations! 🎉👏🎊&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this lesson, we learned how to deploy a simple web application using Google Cloud Run. We also learned about the different components of a container.&lt;/p&gt;

&lt;p&gt;My Medium repost: &lt;a href="https://medium.com/google-cloud/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-2-5-flash-lite-8398e4d29819" rel="noopener noreferrer"&gt;https://medium.com/google-cloud/how-to-build-deploy-a-simple-streamlit-chatbot-using-gemini-2-5-flash-lite-8398e4d29819&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gemini</category>
      <category>streamlit</category>
      <category>googlecloud</category>
    </item>
  </channel>
</rss>
