|
import os |
|
import time |
|
|
|
import openai |
|
import streamlit as st |
|
|
|
from models.llamaCustom import LlamaCustom |
|
from utils.chatbox import * |
|
|
|
st.set_page_config(page_title="Llama", page_icon="🦙") |
|
|
|
st.subheader("Llama Index with Custom LLM Demo") |
|
|
|
if "messages" not in st.session_state: |
|
st.session_state.messages = [] |
|
|
|
if "openai_api_key" not in st.session_state: |
|
st.info("Enter your openai key to access the chatbot.") |
|
else: |
|
with st.spinner("Initializing vector index"): |
|
model = LlamaCustom(name="llamaCustom") |
|
|
|
chatbox("llama_custom", model) |
|
|