Spaces:
Sleeping
Sleeping
added load_data method
Browse files
app.py
CHANGED
|
@@ -200,6 +200,17 @@ with gr.Blocks() as demo:
|
|
| 200 |
outputs=[status_output, results_table]
|
| 201 |
)
|
| 202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
if __name__ == "__main__":
|
| 204 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 205 |
# Check for SPACE_HOST and SPACE_ID at startup for information
|
|
|
|
| 200 |
outputs=[status_output, results_table]
|
| 201 |
)
|
| 202 |
|
| 203 |
+
def load_data():
|
| 204 |
+
import load_vectorstore
|
| 205 |
+
return "✅ Data loaded into Supabase"
|
| 206 |
+
|
| 207 |
+
with gr.Blocks() as demo:
|
| 208 |
+
load_button = gr.Button("🔄 Load Data to Supabase")
|
| 209 |
+
load_status = gr.Textbox(label="Load Status")
|
| 210 |
+
|
| 211 |
+
load_button.click(fn=load_data, outputs=load_status)
|
| 212 |
+
|
| 213 |
+
|
| 214 |
if __name__ == "__main__":
|
| 215 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 216 |
# Check for SPACE_HOST and SPACE_ID at startup for information
|