TipGeneratorBot / app.py
TaskAssignmentBotDatasetUpdateRole's picture
Update app.py
7861621 verified
raw
history blame
760 Bytes
import gradio as gr
from gradio_client import Client
import os
# HF_TOKEN = os.environ.get('HUGGING_FACE_HUB_TOKEN')
HF_TOKEN = os.environ.get('hf_access_to_private_space2')
def environ_auth(username, password):
if username == os.environ.get('mattias_hallberg') and password == os.environ.get('mattias_hallberg_password'):
return True
elif username == os.environ.get('michal_gradshtein') and password == os.environ.get('michal_gradshtein_password'):
return True
else:
return False
demo = gr.load("attuned-ai/Attuned-Communication-Bot", src="spaces", hf_token=HF_TOKEN)
# demo = gr.load("attuned-ai/TestPrivateSpace", src="spaces", hf_token=HF_TOKEN)
demo.queue(max_size=20)
demo.launch(auth=environ_auth).launch()