test2
Browse files- app.py +2 -4
- requirements.txt +0 -1
app.py
CHANGED
@@ -4,9 +4,8 @@ from huggingface_hub import hf_hub_download
|
|
4 |
import streamlit as st
|
5 |
import os
|
6 |
import subprocess as sp
|
7 |
-
import shlex as sx
|
8 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
9 |
-
hf_hub_download(repo_id="dnato/ggml-gpt4all-j-v1.3-groovy.bin", filename="ggml-gpt4all-j-v1.3-groovy.bin", local_dir=".")
|
10 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
11 |
template = """
|
12 |
You are a friendly chatbot assistant that responds in a conversational
|
@@ -34,7 +33,6 @@ def main():
|
|
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,7 +41,7 @@ def main():
|
|
43 |
#answer = response['choices'][0]['message']['content']
|
44 |
|
45 |
# Display the response
|
46 |
-
st.text_area("Bot Response:", value=sp.check_output(
|
47 |
|
48 |
if __name__ == "__main__":
|
49 |
main()
|
|
|
4 |
import streamlit as st
|
5 |
import os
|
6 |
import subprocess as sp
|
|
|
7 |
#gpt=GPT4All("ggml-gpt4all-j-v1.3-groovy")
|
8 |
+
#hf_hub_download(repo_id="dnato/ggml-gpt4all-j-v1.3-groovy.bin", filename="ggml-gpt4all-j-v1.3-groovy.bin", local_dir=".")
|
9 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
10 |
template = """
|
11 |
You are a friendly chatbot assistant that responds in a conversational
|
|
|
33 |
|
34 |
# User input
|
35 |
query = st.text_input("Enter your message:")
|
|
|
36 |
|
37 |
# Generate response
|
38 |
if st.button("Submit"):
|
|
|
41 |
#answer = response['choices'][0]['message']['content']
|
42 |
|
43 |
# Display the response
|
44 |
+
st.text_area("Bot Response:", value=sp.check_output(query), height=100)
|
45 |
|
46 |
if __name__ == "__main__":
|
47 |
main()
|
requirements.txt
CHANGED
@@ -4,4 +4,3 @@ langchain
|
|
4 |
huggingface
|
5 |
huggingface_hub
|
6 |
radon
|
7 |
-
shlex
|
|
|
4 |
huggingface
|
5 |
huggingface_hub
|
6 |
radon
|
|