Spaces:
Runtime error
Runtime error
File size: 1,422 Bytes
0c05632 37c74f6 c2585c5 0c05632 34875fd 7861621 34875fd 0b31b8a 34875fd 1d0579a 34875fd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
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
elif username == os.environ.get('robert_bagares') and password == os.environ.get('robert_bagares_password'):
return True
elif username == os.environ.get('akiko_kinjo') and password == os.environ.get('akiko_kinjo_password'):
return True
elif username == os.environ.get('junichiro_kawashima') and password == os.environ.get('junichiro_kawashima_password'):
return True
elif username == os.environ.get('tomoya_yoshida') and password == os.environ.get('tomoya_yoshida_password'):
return True
elif username == os.environ.get('miho_breen') and password == os.environ.get('miho_breen_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() |