| 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)) |