Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,13 +6,10 @@ st.title("Gemini ChatBOT")
|
|
| 6 |
def llm_response(user_input):
|
| 7 |
llm = ChatGoogleGenerativeAI(model="gemini-pro")
|
| 8 |
result = llm.invoke(user_input)
|
| 9 |
-
return
|
| 10 |
|
| 11 |
user_input = st.text_area("Enter your query here...")
|
| 12 |
|
| 13 |
if st.button("Get Response") and user_input:
|
| 14 |
with st.spinner("Generating Response..."):
|
| 15 |
-
|
| 16 |
-
if answer is not None:
|
| 17 |
-
st.success('Great! Response generated successfully')
|
| 18 |
-
st.write(answer)
|
|
|
|
| 6 |
def llm_response(user_input):
|
| 7 |
llm = ChatGoogleGenerativeAI(model="gemini-pro")
|
| 8 |
result = llm.invoke(user_input)
|
| 9 |
+
return st.write(result.content)
|
| 10 |
|
| 11 |
user_input = st.text_area("Enter your query here...")
|
| 12 |
|
| 13 |
if st.button("Get Response") and user_input:
|
| 14 |
with st.spinner("Generating Response..."):
|
| 15 |
+
llm_response(user_input)
|
|
|
|
|
|
|
|
|