Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -107,15 +107,18 @@ def chatbot(input, choice):
|
|
107 |
css = "textarea {-webkit-text-fill-color:black; -webkit-opacity: 1;}"
|
108 |
|
109 |
|
110 |
-
auth_list = (
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
)
|
|
|
|
|
|
|
119 |
|
120 |
## 如果要优化显示效果,参见: https://gradio.app/theming-guide/
|
121 |
try:
|
@@ -132,7 +135,7 @@ try:
|
|
132 |
css=css,
|
133 |
)
|
134 |
interface.queue(concurrency_count=100)
|
135 |
-
interface.launch(height=500,auth=auth_list)
|
136 |
|
137 |
except Exception as e:
|
138 |
print(e)
|
|
|
107 |
css = "textarea {-webkit-text-fill-color:black; -webkit-opacity: 1;}"
|
108 |
|
109 |
|
110 |
+
# auth_list = (
|
111 |
|
112 |
+
# ('1234','1234'),
|
113 |
+
# ('yao190476','0476'),
|
114 |
+
# ('bluedongting','ting'),
|
115 |
+
# ('mio','mio'),
|
116 |
+
# ('ainachen','chen'),
|
117 |
+
# ('wenshan','shan'),
|
118 |
+
# )
|
119 |
+
|
120 |
+
user_csv = pd.read_csv('auth_list.csv')
|
121 |
+
auth_list = [(x, y) for (x, y) in user_csv[['username', 'password']].values]
|
122 |
|
123 |
## 如果要优化显示效果,参见: https://gradio.app/theming-guide/
|
124 |
try:
|
|
|
135 |
css=css,
|
136 |
)
|
137 |
interface.queue(concurrency_count=100)
|
138 |
+
interface.launch(height=500,auth=auth_list,auth_message="欢迎使用ChatGPT")
|
139 |
|
140 |
except Exception as e:
|
141 |
print(e)
|