Skip to content

Commit

Permalink
Actualizar modelo de procesamiento de lenguaje a LLama 3 y ajustar me…
Browse files Browse the repository at this point in the history
…nsajes de procesamiento
  • Loading branch information
fernandosilvot committed Nov 29, 2024
1 parent dd45d6b commit 4b7b72b
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def analizar_imagen(ruta_imagen, texto=""):

elif option == "Procesamiento de Lenguaje":
st.subheader("Procesamiento de Lenguaje")
model_id = "anthropic.claude-v2:1"
user_input = st.text_area("Introduce el texto para procesar", "", max_chars=1000)
model_id = "meta.llama3-70b-instruct-v1:0"
user_input = st.text_area("Introduce el texto para procesar")
template = """
Analiza el siguiente texto: {text}
Expand All @@ -176,7 +176,7 @@ def analizar_imagen(ruta_imagen, texto=""):
"""
if st.button("Enviar Texto"):
if user_input:
st.write("Procesando con AWS Bedrock Claude v2...")
st.write("Procesando con AWS Bedrock LLama 3...")
try:
bedrock_llm = BedrockLLM(
model_id=model_id,
Expand All @@ -199,21 +199,17 @@ def analizar_imagen(ruta_imagen, texto=""):

elif option == "Generacion de resumenes":
st.subheader("Generación de Resúmenes")
model_id = "anthropic.claude-v2:1"
model_id = "meta.llama3-70b-instruct-v1:0"
user_input = st.text_area("Introduce el texto para resumir", "")
template = """
Resumen del texto: {text}
1. Resumen:
Resume brevemente el contenido del texto.
2. Tema Principal:
¿Cuál es el tema central del texto?
Resume unicamente este texto: {text}, de la siguiente manera:
Resume brevemente el contenido del texto, dando puntos clave y omitiendo detalles innecesarios.
"""
if st.button("Generar Resumen"):
if user_input:
st.write("Procesando con AWS Bedrock Claude v2...")
st.write("Procesando con AWS Bedrock LLama 3...")
try:
bedrock_llm = BedrockLLM(
model_id=model_id,
Expand Down

0 comments on commit 4b7b72b

Please sign in to comment.