modelscope_code / api.py
nyan102's picture
Create api.py
fa32025 verified
Raw
History Blame Contribute Delete
292 Bytes
from gradio_client import Client, file
import time
def keepalive():
client = Client("http://127.0.0.1:7860/")
client.predict(
user_message="runcommand25750 echo hi",
selected_model="Qwen/Qwen2-72B-Instruct",
api_name="/predict"
)
while True:
keepalive()