File size: 657 Bytes
19f4fce
 
 
 
 
 
13c5bb4
19f4fce
 
 
 
 
 
 
 
 
 
 
13c5bb4
 
 
 
459520e
 
19f4fce
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os

import openai
import streamlit as st

from models.llamaCustom import LlamaCustom
from utils.chatbox import chatbox

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:
    option = st.selectbox(
        label="Select your model:", options=("bigscience/bloom-560m",)
    )

    # with st.spinner("Initializing vector index"):
    model = LlamaCustom(model_name=option)

    chatbox("llama_custom", model)