Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -157,7 +157,18 @@ def greet(text):
|
|
157 |
# print('类别为:{}'.format(classes[predic[0]]))
|
158 |
return classes[predic[0]]
|
159 |
#
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
demo.launch()
|
163 |
# with torch.no_grad():
|
|
|
157 |
# print('类别为:{}'.format(classes[predic[0]]))
|
158 |
return classes[predic[0]]
|
159 |
#
|
160 |
+
css = """
|
161 |
+
body {
|
162 |
+
background-color: #f6f6f6;
|
163 |
+
font-family: Arial, sans-serif;
|
164 |
+
}
|
165 |
+
.btn-primary {
|
166 |
+
background-color: #1abc9c;
|
167 |
+
border-color: #1abc9c;
|
168 |
+
color: #ffffff;
|
169 |
+
}
|
170 |
+
"""
|
171 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text",title="text-classification app",css=css)
|
172 |
|
173 |
demo.launch()
|
174 |
# with torch.no_grad():
|