Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from langchain.prompts import PromptTemplate
|
| 3 |
-
from langchain.chains import LLMChain
|
| 4 |
from langchain.llms import CTransformers
|
|
|
|
| 5 |
from langchain.memory import ConversationBufferWindowMemory
|
| 6 |
|
| 7 |
path = "TheBloke/Llama-2-7B-Chat-GGML"
|
|
@@ -24,6 +23,9 @@ st.title("LLM Chatbot")
|
|
| 24 |
# input
|
| 25 |
question = st.text_input("Question")
|
| 26 |
# output
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
st.text(answer)
|
| 29 |
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
| 2 |
from langchain.llms import CTransformers
|
| 3 |
+
from langchain import PromptTemplate, LLMChain
|
| 4 |
from langchain.memory import ConversationBufferWindowMemory
|
| 5 |
|
| 6 |
path = "TheBloke/Llama-2-7B-Chat-GGML"
|
|
|
|
| 23 |
# input
|
| 24 |
question = st.text_input("Question")
|
| 25 |
# output
|
| 26 |
+
|
| 27 |
+
with st.spinner('Wait for it...'):
|
| 28 |
+
answer = chain.run(question)
|
| 29 |
+
st.success('Done!')
|
| 30 |
st.text(answer)
|
| 31 |
|