File size: 737 Bytes
55f681e
 
 
84077d6
55f681e
f537f22
 
84077d6
f537f22
ca52261
 
f537f22
3186976
f537f22
 
1f14ed7
f537f22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import os

auth_message = "The username and password are the same. Hint: This chatbot is about recycling of _______ (a word starting with 'b', 7 letters)."
hf_token= os.environ["HUGGINGFACEHUB_API_TOKEN"]
dev_space = os.environ["DEV_SPACE"]
demo = gr.load(dev_space, src="spaces", hf_token=hf_token)
demo.launch(auth=(os.getenv("USERNAME"), os.getenv("PASSWORD")), auth_message=auth_message)


# or 
# tmp_link = os.environ["REMOTE_GRADIO_LINK"]

# with gr.Blocks(css="""footer {visibility: hidden};""") as demo:
#    output = gr.HTML("""<iframe src="{}" style="width:100%; height:1024px; overflow:auto"></iframe>""".format(tmp_link))
# demo.launch(auth=(os.getenv("USERNAME"), os.getenv("PASSWORD")))
# demo.launch()