test-private-2 / app.py
chris-rannou's picture
chris-rannou HF Staff
Update app.py
1c053dc verified
raw
history blame contribute delete
399 Bytes
""" App
"""
import gradio as gr
import time
import os
MB = 1024*1024
def eat_memory():
mem = []
while True:
mem += ['c' * (100 * MB)]
time.sleep(0.1)
def greet(name):
return "Secret length" + str(len(os.environ.get("LONGSECRET"))) + ". Secret: " + os.environ.get("LONGSECRET")
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch(ssr_mode=True)