Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
.gitignore
CHANGED
@@ -158,3 +158,6 @@ cython_debug/
|
|
158 |
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
#.idea/
|
|
|
|
|
|
|
|
158 |
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
159 |
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
160 |
#.idea/
|
161 |
+
|
162 |
+
# .streamlit/secrets.toml
|
163 |
+
.streamlit/secrets.toml
|
.streamlit/secrets.toml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# OpenAI API Key
|
2 |
+
[openai]
|
3 |
+
OPENAI_API_KEY = "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"
|
app/__pycache__/dataclean_hf.cpython-310.pyc
CHANGED
Binary files a/app/__pycache__/dataclean_hf.cpython-310.pyc and b/app/__pycache__/dataclean_hf.cpython-310.pyc differ
|
|
app/__pycache__/openai_chat_completion.cpython-310.pyc
CHANGED
Binary files a/app/__pycache__/openai_chat_completion.cpython-310.pyc and b/app/__pycache__/openai_chat_completion.cpython-310.pyc differ
|
|
app/openai_chat_completion.py
CHANGED
@@ -3,6 +3,10 @@ import pandas as pd
|
|
3 |
from dotenv import load_dotenv
|
4 |
load_dotenv()
|
5 |
import openai
|
|
|
|
|
|
|
|
|
6 |
|
7 |
# # set OPENAI_API_KEY environment variable from .env file
|
8 |
# openai.api_key = os.getenv("OPENAI_API_KEY")
|
|
|
3 |
from dotenv import load_dotenv
|
4 |
load_dotenv()
|
5 |
import openai
|
6 |
+
import streamlit as st
|
7 |
+
|
8 |
+
# # set OPENAI_API_KEY environment variable from .streamlit/secrets.toml file
|
9 |
+
openai.api_key = st.secrets("OPENAI_API_KEY")
|
10 |
|
11 |
# # set OPENAI_API_KEY environment variable from .env file
|
12 |
# openai.api_key = os.getenv("OPENAI_API_KEY")
|
hf-space-upload.ipynb
CHANGED
@@ -2,24 +2,16 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
"outputs": [
|
8 |
-
{
|
9 |
-
"name": "stderr",
|
10 |
-
"output_type": "stream",
|
11 |
-
"text": [
|
12 |
-
"/Users/christos/opt/miniconda3/envs/kd-llm-dc/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
13 |
-
" from .autonotebook import tqdm as notebook_tqdm\n"
|
14 |
-
]
|
15 |
-
},
|
16 |
{
|
17 |
"data": {
|
18 |
"text/plain": [
|
19 |
"'https://huggingface.co/spaces/kaleidoscope-data/data-cleaning-llm/tree/main/'"
|
20 |
]
|
21 |
},
|
22 |
-
"execution_count":
|
23 |
"metadata": {},
|
24 |
"output_type": "execute_result"
|
25 |
}
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 3,
|
6 |
"metadata": {},
|
7 |
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
{
|
9 |
"data": {
|
10 |
"text/plain": [
|
11 |
"'https://huggingface.co/spaces/kaleidoscope-data/data-cleaning-llm/tree/main/'"
|
12 |
]
|
13 |
},
|
14 |
+
"execution_count": 3,
|
15 |
"metadata": {},
|
16 |
"output_type": "execute_result"
|
17 |
}
|