File size: 441 Bytes
c90151d
 
f624d68
 
 
c90151d
f624d68
 
c90151d
 
f624d68
 
 
 
 
 
 
c90151d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr

import list_repos
import refresh_lists

def greet(name):
    refresh_repos()
    refresh_files()
    return "Hello " + name + "!!"

def refresh_repos(progress=gr.Progress(track_tqdm=True)):
    list_repos.write_repos_to_db()

def refresh_files(progress=gr.Progress(track_tqdm=True)):
    while True:
        refresh_lists.refresh_oldest_repo()

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()