Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
import pandas as pd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
# Carga los datos de entrenamiento
|
| 4 |
-
df = pd.read_csv('./
|
| 5 |
|
| 6 |
# Crea un arreglo con los contextos
|
| 7 |
context_data = []
|
|
@@ -10,7 +17,7 @@ for i in range(len(df)):
|
|
| 10 |
for j in range(3):
|
| 11 |
context += df.columns[j]
|
| 12 |
context += ": "
|
| 13 |
-
context += df.iloc[i
|
| 14 |
context += " "
|
| 15 |
context_data.append(context)
|
| 16 |
|
|
|
|
| 1 |
import pandas as pd
|
| 2 |
+
from langchain_groq import ChatGroq
|
| 3 |
+
from langchain_huggingface import HuggingFaceEmbeddings
|
| 4 |
+
from langchain_chroma import Chroma
|
| 5 |
+
from langchain_core.prompts import PromptTemplate
|
| 6 |
+
from langchain_core.output_parsers import StrOutputParser
|
| 7 |
+
from langchain_core.runnables import RunnablePassthrough
|
| 8 |
+
import gradio as gr
|
| 9 |
|
| 10 |
# Carga los datos de entrenamiento
|
| 11 |
+
df = pd.read_csv('./datos_mecanica.csv')
|
| 12 |
|
| 13 |
# Crea un arreglo con los contextos
|
| 14 |
context_data = []
|
|
|
|
| 17 |
for j in range(3):
|
| 18 |
context += df.columns[j]
|
| 19 |
context += ": "
|
| 20 |
+
context += df.iloc[i, j] # Cambia esto
|
| 21 |
context += " "
|
| 22 |
context_data.append(context)
|
| 23 |
|