Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
-
import base64
|
4 |
-
import os
|
5 |
import llama_index
|
6 |
from audio_recorder_streamlit import audio_recorder
|
7 |
from openai import OpenAI
|
8 |
from llama_index import VectorStoreIndex, SimpleDirectoryReader
|
9 |
-
os.environ['OPENAI_API_KEY'] =
|
10 |
-
API_KEY =
|
11 |
def RAG(text):
|
12 |
documents = SimpleDirectoryReader("db3").load_data()
|
13 |
index = VectorStoreIndex.from_documents(documents)
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
+
import base64
|
4 |
+
import os
|
5 |
import llama_index
|
6 |
from audio_recorder_streamlit import audio_recorder
|
7 |
from openai import OpenAI
|
8 |
from llama_index import VectorStoreIndex, SimpleDirectoryReader
|
9 |
+
os.environ['OPENAI_API_KEY'] = os.getenv("apikey")
|
10 |
+
API_KEY = os.getenv("apikey")
|
11 |
def RAG(text):
|
12 |
documents = SimpleDirectoryReader("db3").load_data()
|
13 |
index = VectorStoreIndex.from_documents(documents)
|