ldhldh commited on
Commit
5be15aa
1 Parent(s): 864cf45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -33
app.py CHANGED
@@ -59,36 +59,31 @@ def yn(x):
59
  )
60
  return result
61
 
62
-
63
- aa = gr.Interface(
64
- fn=yn,
65
- inputs="text",
66
- outputs="text",
67
- examples=[
68
- ["Jill"],
69
- ["Sam"]
70
- ],
71
- )
72
- aa.launch()
73
-
74
- bb = gr.Interface(
75
- fn=chat,
76
- inputs="text",
77
- outputs="text",
78
- examples=[
79
- ["Jill"],
80
- ["Sam"]
81
- ],
82
- )
83
- bb.launch()
84
-
85
- cc = gr.Interface(
86
- fn=mbti,
87
- inputs="text",
88
- outputs="text",
89
- examples=[
90
- ["Jill"],
91
- ["Sam"]
92
- ],
93
- )
94
- cc.launch()
 
59
  )
60
  return result
61
 
62
+ with gr.Blocks() as demo:
63
+ aa = gr.Interface(
64
+ fn=yn,
65
+ inputs="text",
66
+ outputs="text",
67
+ examples=[
68
+ ["yes,no"]
69
+ ],
70
+ )
71
+
72
+ bb = gr.Interface(
73
+ fn=chat,
74
+ inputs="text",
75
+ outputs="text",
76
+ examples=[
77
+ ["chat"]
78
+ ],
79
+ )
80
+
81
+ cc = gr.Interface(
82
+ fn=mbti,
83
+ inputs="text",
84
+ outputs="text",
85
+ examples=[
86
+ ["mbti"]
87
+ ],
88
+ )
89
+ demo.queue(max_size=32).launch(enable_queue=True)