support / app.py
gofeco's picture
Update app.py
72e8145 verified
raw
history blame contribute delete
421 Bytes
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)
st.text("W:"+themod)
else:
st.text("S:"+response)