lalalic commited on
Commit
52909e5
1 Parent(s): 13b24be

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -2,7 +2,7 @@ import os, json, logging
2
  import requests
3
  from transformers import pipeline
4
 
5
- from flask import Flask, request
6
  app=Flask(__name__)
7
  @app.route("/")
8
  def hello():
@@ -27,7 +27,7 @@ api=HfApi()
27
  def search():
28
  args=request.args.to_dict()
29
  models = api.list_models(**args)
30
- return models
31
 
32
  @app.route("/task_list")
33
  def tasks():
 
2
  import requests
3
  from transformers import pipeline
4
 
5
+ from flask import Flask, request, jsonify
6
  app=Flask(__name__)
7
  @app.route("/")
8
  def hello():
 
27
  def search():
28
  args=request.args.to_dict()
29
  models = api.list_models(**args)
30
+ return jsonify(models)
31
 
32
  @app.route("/task_list")
33
  def tasks():