LastSmile/CodeLlama-7b
0
1import streamlit as st2import requests3 4# Run this with: streamlit run streamlit_app.py5# Streamlit interface6st.title("Gemini Central Console Bot")7user_input = st.text_input("Enter your text here")8url = "http://localhost:8000/predict" # URL of your FastAPI predict endpoint9 10if st.button("Submit"):11 # Prepare the payload12 payload = {"prompt": user_input}13 14 # Send the request to FastAPI endpoint15 response = requests.post(url, json=payload)16 17 # Display the response18 if response.status_code == 200:19 result = response.json()20 content = result["choices"][0]["message"]["content"]21 st.write(content)22 else:23 st.write("Failed to get response")24 