Spaces:
Running
Running
File size: 604 Bytes
c1b6da1 0589c8a c1b6da1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
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)
|