Skip to content

Commit fa5a707

Browse files
Updated files
- Updated Readme file with project structure - Updated requirements.txt - Updated path to messages after renaming
1 parent bcbca77 commit fa5a707

File tree

3 files changed

+57
-6
lines changed

3 files changed

+57
-6
lines changed

ai/generative-ai-service/sentiment+categorization/files/README.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,33 @@ This demo showcases an AI-powered solution for analyzing batches of customer mes
1616
* Customer messages should be stored in a CSV file(s) within a folder named `data`.
1717
* Each CSV file should contain a column with the message text.
1818

19+
## Python Version
20+
This project requires **Python 3.13** or later. You can check your current Python version by running:
21+
```
22+
python --version
23+
```
24+
or
25+
```
26+
python3 --version
27+
```
28+
1929
## Getting Started
2030
To run the demo, follow these steps:
2131
1. Clone the repository using `git clone`.
22-
2. Place your CSV files containing customer messages in the `data` folder.
23-
3. Install dependencies using `pip install -r requirements.txt`.
24-
4. Run the application using `streamlit run app.py`.
32+
2. *(Optional but recommended)* Create and activate a Python virtual environment:
33+
- On Windows:
34+
```
35+
python -m venv venv
36+
venv\Scripts\activate
37+
```
38+
- On macOS/Linux:
39+
```
40+
python3 -m venv venv
41+
source venv/bin/activate
42+
```
43+
3. Place your CSV files containing customer messages in the `data` folder. Ensure each includes a column with the message text.
44+
4. Install dependencies using `pip install -r requirements.txt`.
45+
5. Run the application using `streamlit run app.py`.
2546
2647
## Example Use Cases
2748
* Analyze customer feedback from surveys, reviews, or social media platforms to identify trends and patterns.
@@ -34,9 +55,34 @@ To run the demo, follow these steps:
3455
* All aspects of the demo, including:
3556
+ Hierarchical categorization
3657
+ Sentiment analysis
37-
+ Structured report generation
38-
are powered by GenAI, ensuring accurate and efficient analysis of customer messages.
58+
+ Structured report generation are powered by GenAI, ensuring accurate and efficient analysis of customer messages.
59+
60+
61+
## Project Structure
62+
63+
The repository is organized as follows:
3964
65+
```plaintext
66+
│ app.py # Main Streamlit application entry point
67+
│ README.md # Project documentation
68+
│ requirements.txt # Python dependencies
69+
70+
├───backend
71+
│ │ feedback_agent.py # Logic for feedback processing agents
72+
│ │ feedback_wrapper.py # Wrappers and interfaces for feedback functionalities
73+
│ │ message_handler.py # Utilities for handling and preprocessing messages
74+
│ │
75+
│ ├───data
76+
│ │ complaints_messages.csv # Example dataset of customer messages
77+
│ │
78+
│ └───utils
79+
│ config.py # Configuration and setup for the project
80+
│ llm_config.py # Model- and LLM-related configuration
81+
│ prompts.py # Prompt templates for language models
82+
83+
└───pages
84+
SentimentByCat.py # Additional Streamlit page for sentiment by category
85+
```
4086
## Output
4187
The demo will display an interactive dashboard with the generated report, providing valuable insights into customer messages, including:
4288
* Category distribution across all three levels

ai/generative-ai-service/sentiment+categorization/files/backend/feedback_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Set up logging
1515
logging.getLogger("oci").setLevel(logging.DEBUG)
16-
messages_path = "ai/generative-ai-service/sentiment+categorization/demo_code/backend/data/complaints_messages.csv"
16+
messages_path = "ai/generative-ai-service/sentiment+categorization/files/backend/data/complaints_messages.csv"
1717

1818

1919
class AgentState(BaseModel):
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
langchain-community==0.3.23
2+
langgraph==0.4.1
3+
oci==2.150.3
4+
plotly==6.0.1
5+
streamlit==1.45.0

0 commit comments

Comments
 (0)