PointLLM / app.py
Xiaolong-Wang's picture
Update app.py
8ece61b
raw
history blame contribute delete
749 Bytes
# import subprocess
# package_name = "torchgeometry"
# subprocess.check_call(["pip", "install", package_name])
import gradio as gr
# import torchgeometry as tgm
def greet(name, user_name):
user_name += name
return "Hello " + user_name + "!!", user_name
with gr.Blocks() as demo:
user_name = gr.State(value='')
name_input = gr.Textbox(visible = True,lines=1, label='Name input')
name_output = gr.Textbox(visible = True,lines=1, label='Name output')
btn = gr.Button(value="Send")
btn.click(greet, inputs = [name_input, user_name], outputs=[name_output,user_name])
demo.queue()
demo.launch() # server_port=7832, share=True
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
# iface.launch(app=app)