ramya_bot / try2.py
nrohan988's picture
Update try2.py
21948a3
raw
history blame
524 Bytes
from langchain import HuggingFaceHub
import streamlit as st
import os
def get_openai_response(question):
llm = HuggingFaceHub(repo_id="google/flan-t5-large", model_kwargs={"temperature":0.5,"max_length":2048})
response = llm(question)
return response
st.set_page_config(page_title="Ramya Bot")
st.header("Ask Ramya?")
input_text = st.text_input("Inka pet nikal raha hain, aage badh raha hain", key="input")
if input_text:
st.subheader("The Response is")
st.write(get_openai_response(input_text))