PointLLM / app.py
Xiaolong-Wang's picture
Update app.py
17e2f40
raw
history blame
404 Bytes
import subprocess
# 安装单个包
package_name = "flask"
subprocess.check_call(["pip", "install", package_name])
import gradio as gr
from flask import Flask, session
app = Flask(__name__)
def greet(name):
session["user_name"] += name
user_name = session["user_name"]
return "Hello " + user_name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch(app=app)