File size: 957 Bytes
53afbc9
 
 
 
 
 
85b0d4d
53afbc9
 
 
 
7718c02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85b0d4d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: Content Analysis Workflow Automation
emoji: 📊
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: "1.36.0"
app_file: app.py
pinned: false
---

# Content Analysis Workflow Automation

This Streamlit dashboard integrates OpenAI and Snowflake to generate and run
SQL queries for content analysis. Provide a description of the content you want
to analyze and the app will:

1. Use OpenAI to craft a Snowflake SQL query based on custom instructions.
2. Execute the query against your Snowflake warehouse.
3. Display the results in an interactive table.

## Setup

1. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```
2. Set the required environment variables for OpenAI and Snowflake:
   - `OPENAI_API_KEY`
   - `SNOWFLAKE_USER`
   - `SNOWFLAKE_PASSWORD`
   - `SNOWFLAKE_ACCOUNT`
   - `SNOWFLAKE_WAREHOUSE`
   - `SNOWFLAKE_DATABASE`
   - `SNOWFLAKE_SCHEMA`
3. Run the app:
   ```bash
   streamlit run app.py
   ```