File size: 524 Bytes
9106761 3adc25d 9106761 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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)) |