Spaces:
Sleeping
Sleeping
10 commit
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ from langchain import PromptTemplate, LLMChain
|
|
2 |
from gpt4all import GPT4All
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import streamlit as st
|
|
|
5 |
import os
|
6 |
import subprocess as sp
|
7 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
@@ -33,6 +34,7 @@ def main():
|
|
33 |
|
34 |
# User input
|
35 |
query = st.text_input("Enter your message:")
|
|
|
36 |
|
37 |
# Generate response
|
38 |
if st.button("Submit"):
|
@@ -41,7 +43,7 @@ def main():
|
|
41 |
#answer = response['choices'][0]['message']['content']
|
42 |
|
43 |
# Display the response
|
44 |
-
st.text_area("Bot Response:", value=sp.check_output(
|
45 |
|
46 |
if __name__ == "__main__":
|
47 |
main()
|
|
|
2 |
from gpt4all import GPT4All
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
import streamlit as st
|
5 |
+
import shlex as sx
|
6 |
import os
|
7 |
import subprocess as sp
|
8 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
|
|
34 |
|
35 |
# User input
|
36 |
query = st.text_input("Enter your message:")
|
37 |
+
cm=sx.split(query)
|
38 |
|
39 |
# Generate response
|
40 |
if st.button("Submit"):
|
|
|
43 |
#answer = response['choices'][0]['message']['content']
|
44 |
|
45 |
# Display the response
|
46 |
+
st.text_area("Bot Response:", value=sp.check_output(cm), height=100)
|
47 |
|
48 |
if __name__ == "__main__":
|
49 |
main()
|