Spaces:
Runtime error
Runtime error
AlbertoFH98
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
# -- Import libraries
|
2 |
-
from langchain.prompts
|
3 |
-
from PIL
|
4 |
-
from streamlit.logger
|
5 |
-
from streamlit_player
|
6 |
-
from
|
7 |
-
import
|
8 |
-
import
|
|
|
9 |
import urllib.request
|
10 |
import argparse
|
11 |
import together
|
@@ -185,7 +186,8 @@ RESPUESTA: """
|
|
185 |
with st.chat_message(message["role"]):
|
186 |
st.markdown(message["content"])
|
187 |
|
188 |
-
|
|
|
189 |
st.markdown(search.run("¿Quién es Roberto Vaquero?"))
|
190 |
if prompt := st.chat_input("¡Pregunta lo que quieras!"):
|
191 |
with st.chat_message("user"):
|
|
|
1 |
# -- Import libraries
|
2 |
+
from langchain.prompts import PromptTemplate
|
3 |
+
from PIL import Image
|
4 |
+
from streamlit.logger import get_logger
|
5 |
+
from streamlit_player import st_player
|
6 |
+
from langchain_community.utilities import DuckDuckGoSearchAPIWrapper
|
7 |
+
from langchain.tools import DuckDuckGoSearchRun
|
8 |
+
import pandas as pd
|
9 |
+
import streamlit as st
|
10 |
import urllib.request
|
11 |
import argparse
|
12 |
import together
|
|
|
186 |
with st.chat_message(message["role"]):
|
187 |
st.markdown(message["content"])
|
188 |
|
189 |
+
wrapper = DuckDuckGoSearchAPIWrapper(region="es-es", max_results=10)
|
190 |
+
search = DuckDuckGoSearchRun(api_wrapper=wrapper)
|
191 |
st.markdown(search.run("¿Quién es Roberto Vaquero?"))
|
192 |
if prompt := st.chat_input("¡Pregunta lo que quieras!"):
|
193 |
with st.chat_message("user"):
|