GloriaGPT / app.py
avinashmhto's picture
Update app.py
0589c8a
raw
history blame contribute delete
604 Bytes
import streamlit as st
from langchain.llms import HuggingFaceHub
def load_answer(question):
llm = HuggingFaceHub(repo_id="NousResearch/Llama-2-13b-hf")
answer=llm(question)
return answer
st.set_page_config(page_title="Gloria-GPT", page_icon=":robot:")
st.header("Hi, I am Gloria-GPT, How may I assist you ?")
def get_text():
input_text = st.text_input("You: ", key="input")
return input_text
user_input=get_text()
response = load_answer(user_input)
submit = st.button('Generate')
#If generate button is clicked
if submit:
st.subheader("Answer:")
st.write(response)