Skip to content

Commit 8114435

Browse files
committed
Update README and main.py for AI Chat Bot project
- Added project description and location for AI Chat Bot using Google Gemini API in README.md. - Removed test image URLs from main.py and fixed formatting in content generation request.
1 parent 973ff40 commit 8114435

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ This collection showcases multiple Python-based projects for data analysis, visu
77

88
## 📦 Projects Included
99

10+
### 🤖 AI Chat Bot with Google Gemini API
11+
12+
- **Description:**
13+
A terminal-based Python application that uses the Google Gemini API to extract text from images via a conversational interface. Prompts the user for their name and an image URL, performs OCR, and appends the user's name to the extracted text.
14+
- **Location:** `ai-chat-bot-google-gemini/`
15+
1016
### 📈 Stock Data Application
1117

1218
- **Description:**
@@ -37,9 +43,10 @@ This collection showcases multiple Python-based projects for data analysis, visu
3743
```
3844
Python-Programs/
3945
40-
├── stock-data-app/ # Streamlit web app
41-
├── stock-data-with-yfinance/ # Data analysis & visualization script
42-
└── README.md # This documentation
46+
├── ai-chat-bot-google-gemini/ # AI chat bot using Google Gemini API
47+
├── stock-data-app/ # Streamlit web app
48+
├── stock-data-with-yfinance/ # Data analysis & visualization script
49+
└── README.md # This documentation
4350
```
4451

4552
---
@@ -53,4 +60,4 @@ Special thanks to the open-source community!
5360

5461
## 📝 License
5562

56-
This repository is for educational and demonstration purposes
63+
This repository is for educational and demonstration purposes only.

ai-chat-bot-google-gemini/main.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
print(f"Welcome {user_name}, let's extract text from an image!")
1515

16-
# Test image URL for OCR
17-
# https://github.com/czhangwt/CIDM4310/blob/main/testocr.png?raw=true
18-
# https://raw.githubusercontent.com/czhangwt/CIDM4310/refs/heads/main/testocr.png
1916
image_path = input("Please enter the image URL: ")
2017

2118
# Fetch the image from the URL
@@ -36,7 +33,8 @@
3633
model="gemini-2.0-flash",
3734
contents=[
3835
# image part object for request
39-
f"Extract the text from the image, put my name {user_name} at the end of the text in a new line.", image
36+
f"Extract the text from the image, put my name {user_name} at the end of the text in a new line.",
37+
image
4038
],
4139
)
4240

0 commit comments

Comments
 (0)