Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import json
|
|
9 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
10 |
|
11 |
# Define the CustomHuggingFaceDatasetSaver class
|
12 |
-
class
|
13 |
def setup(self):
|
14 |
pass
|
15 |
|
@@ -32,7 +32,7 @@ class CustomHuggingFaceDatasetSaver(gr.FlaggingCallback):
|
|
32 |
|
33 |
# Set up the Hugging Face Dataset Saver
|
34 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
35 |
-
hf_writer = gr.
|
36 |
|
37 |
# Define the authentication function
|
38 |
def check_auth(username, password):
|
|
|
9 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
10 |
|
11 |
# Define the CustomHuggingFaceDatasetSaver class
|
12 |
+
class HuggingFaceDatasetSaver(gr.FlaggingCallback):
|
13 |
def setup(self):
|
14 |
pass
|
15 |
|
|
|
32 |
|
33 |
# Set up the Hugging Face Dataset Saver
|
34 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
35 |
+
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "CannaTech/Flagged")
|
36 |
|
37 |
# Define the authentication function
|
38 |
def check_auth(username, password):
|