malizec's picture
Upload folder using huggingface_hub
2de3774 verified
raw
history blame contribute delete
307 Bytes
import gradio as gr
import random
import glob
def get_hint():
hintfiles = glob.glob("hints/*.txt")
hints = []
for hintfile in hintfiles:
lines = open(hintfile, encoding='utf8').read().splitlines()
hints += lines
hint = f"**LPT:** *{random.choice(hints)}*"
return hint