gradio-space / app.py
cbensimon's picture
cbensimon HF Staff
Update app.py
f5c8e43
raw
history blame
448 Bytes
import os
import sys
import gradio as gr
from gradio.inputs import Textbox
from gradio.outputs import Textbox as TextOutput
def process(text):
print('Hello')
sys.stdout.flush()
return f'Hi {text} (API_KEY: {os.environ.get("API_KEY")})'
interface = gr.Interface(
fn=process,
inputs=[Textbox()],
outputs=[TextOutput()],
theme='huggingface',
)
interface.launch(auth=[('a', 'b')])
interface.queue(default_enabled=False)