Spaces:
Runtime error
Runtime error
taratrankennedy
commited on
Commit
•
ecd315e
1
Parent(s):
4a32eb3
(again) Update Secret Key
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from sentence_transformers import SentenceTransformer, util
|
3 |
import openai
|
4 |
import os
|
@@ -10,8 +11,7 @@ os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
|
10 |
filename = "output_country_details.txt" # Path to the file storing country-specific details
|
11 |
retrieval_model_name = 'output/sentence-transformer-finetuned/'
|
12 |
|
13 |
-
openai.api_key =
|
14 |
-
|
15 |
|
16 |
|
17 |
# Attempt to load the necessary models and provide feedback on success or failure
|
|
|
1 |
import gradio as gr
|
2 |
+
import streamlit as st
|
3 |
from sentence_transformers import SentenceTransformer, util
|
4 |
import openai
|
5 |
import os
|
|
|
11 |
filename = "output_country_details.txt" # Path to the file storing country-specific details
|
12 |
retrieval_model_name = 'output/sentence-transformer-finetuned/'
|
13 |
|
14 |
+
openai.api_key = st.secrets["OPENAI_API_KEY"]
|
|
|
15 |
|
16 |
|
17 |
# Attempt to load the necessary models and provide feedback on success or failure
|