gradio-space / app.py
cbensimon's picture
cbensimon HF Staff
Update app.py
ad87ec6
raw
history blame
392 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()