Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,9 @@ from collections import namedtuple
|
|
8 |
import numpy as np
|
9 |
import streamlit as st
|
10 |
from groq import Groq
|
|
|
|
|
|
|
11 |
|
12 |
def clean_text(text):
|
13 |
return re.sub(r'\s+', ' ', text).strip()
|
@@ -238,8 +241,7 @@ def scrivi_dataframe(output, riepilogo):
|
|
238 |
st.divider()
|
239 |
|
240 |
def analizza_dati_ai(output, tipologia):
|
241 |
-
|
242 |
-
client = Groq(api_key=Ak)
|
243 |
if tipologia == 1:
|
244 |
prompt_messages = [
|
245 |
{
|
|
|
8 |
import numpy as np
|
9 |
import streamlit as st
|
10 |
from groq import Groq
|
11 |
+
from dotenv import load_dotenv
|
12 |
+
load_dotenv()
|
13 |
+
API_GROQ = os.getenv('API_GROQ')
|
14 |
|
15 |
def clean_text(text):
|
16 |
return re.sub(r'\s+', ' ', text).strip()
|
|
|
241 |
st.divider()
|
242 |
|
243 |
def analizza_dati_ai(output, tipologia):
|
244 |
+
client = Groq(api_key=API_GROQ)
|
|
|
245 |
if tipologia == 1:
|
246 |
prompt_messages = [
|
247 |
{
|