Spaces:
Sleeping
Sleeping
bluuebunny
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import threading # in a separate thread
|
|
4 |
import gradio as gr # Create a Gradio interface so spaces doesnt timeout
|
5 |
from datetime import datetime
|
6 |
import math
|
|
|
7 |
|
8 |
def log_message(message):
|
9 |
# Print message with a timestamp
|
@@ -11,8 +12,12 @@ def log_message(message):
|
|
11 |
|
12 |
|
13 |
def useless_computation():
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Function to run update_embeddings.py periodically
|
18 |
def run_script_periodically():
|
|
|
4 |
import gradio as gr # Create a Gradio interface so spaces doesnt timeout
|
5 |
from datetime import datetime
|
6 |
import math
|
7 |
+
from gradio_client import Client
|
8 |
|
9 |
def log_message(message):
|
10 |
# Print message with a timestamp
|
|
|
12 |
|
13 |
|
14 |
def useless_computation():
|
15 |
+
client = Client("bluuebunny/update_arxiv_embeddings")
|
16 |
+
result = client.predict(
|
17 |
+
name="Hello!!",
|
18 |
+
api_name="/predict"
|
19 |
+
)
|
20 |
+
print(result)
|
21 |
|
22 |
# Function to run update_embeddings.py periodically
|
23 |
def run_script_periodically():
|