Spaces:
Running
Running
from flask import Flask | |
from gradio_client import Client | |
app = Flask(__name__) | |
def hello(): | |
return '{"status": {"details": {"code": 200, "message": "working"}}}' | |
def api(query): | |
client = Client("https://theblueberry-ai-mist-chat.hf.space/") | |
result = client.predict( | |
query, # str in 'Message' Textbox component | |
api_name = "/chat" | |
) | |
return f'{"result": "{result}"}' | |