import gradio as gr import tensorflow as tf import tensorflow_hub as hub def word_count(input_text): return len(input_text.split()) iface = gr.Interface(fn=word_count, inputs="text", outputs="integer", title="Word Counter", description="Counts the number of words in a text") if __name__ == "__main__": iface.launch()