import sys | |
import textwrap | |
sys.path.insert(0, '.') | |
import nand | |
import streamlit as st | |
para = nand.setupDB("en", 10) | |
print("Ready to receive from chat client") | |
query = st.text_area("Enter a query about ECO:") | |
if query: | |
itisscript, response = nand.process_query(query, para) | |
if not itisscript: | |
themod = textwrap.fill(response, width=77) | |
else: | |
themod = response | |
st.text(themod) | |