Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 2,496 Bytes
acd2f41 0c05632 acd2f41 0c05632 c654853 34875fd 7861621 34875fd 0b31b8a 02aa4a4 0b31b8a 3f2d185 d05579d c11d45d 34875fd e53f398 acd2f41 bbdf34b |
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
#
# Attuned-Copilot
#
import gradio as gr
from gradio_client import Client
import os
HF_TOKEN = os.environ.get('hf_access_to_attuned_copilot_private')
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
elif username == os.environ.get('nishida_hideaki') and password == os.environ.get('nishida_hideaki_password'):
return True
elif username == os.environ.get('casey_wahl') and password == os.environ.get('casey_wahl_password'):
return True
elif username == os.environ.get('takeshi_kato') and password == os.environ.get('takeshi_kato_password'):
return True
elif username == os.environ.get('leonard_ogata') and password == os.environ.get('leonard_ogata_password'):
return True
elif username == os.environ.get('hiroyasu_ito') and password == os.environ.get('hiroyasu_ito_password'):
return True
elif username == os.environ.get('ryo_matsuura') and password == os.environ.get('ryo_matsuura_password'):
return True
elif username == os.environ.get('sho_oshita') and password == os.environ.get('sho_oshita_password'):
return True
elif username == os.environ.get('emi_otsuka') and password == os.environ.get('emi_otsuka_password'):
return True
elif username == os.environ.get('chad_lafferty') and password == os.environ.get('chad_lafferty_password'):
return True
else:
return False
attuned_copilot = gr.load("attuned-ai/Attuned-Copilot-Private-V4", src="spaces", hf_token=HF_TOKEN)
attuned_copilot.queue(max_size=20)
attuned_copilot.launch(auth=environ_auth) |