Spaces:
Runtime error
Runtime error
File size: 382 Bytes
b774a38 cccae94 27cb54d b774a38 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
counter = 0
def predict(inp):
global counter
counter += 1
return str(counter)
def run():
demo = gr.Interface(
fn=predict,
inputs=gr.inputs.Textbox(label="Input Text"),
outputs=gr.outputs.Textbox(label="Output Text"),
)
demo.launch(server_name="0.0.0.0", server_port=7860)
if __name__ == "__main__":
run() |