Spaces:
Runtime error
Runtime error
File size: 435 Bytes
dc96aa4 f335863 dc96aa4 f335863 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
from flask import Flask
from gradio_client import Client
app = Flask(__name__)
@app.route('/')
def hello():
return '{"status": {"details": {"code": 200, "message": "working"}}}'
@app.route('/api/<string:query>')
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}"}'
|