File size: 519 Bytes
0d99407
 
1d80f9d
0d99407
b0d83cf
0d99407
 
1d80f9d
0d99407
14d87d2
0d99407
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# import streamlit as st
# from transformers import pipeline

import gradio as gr

def image_classifier(inp):
    return {'cat': 0.3, 'dog': 0.7}

demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
demo.launch(server_port=11924)

# st.title("Определятор токсичности!")

# pipe = pipeline(task='text-classification', model='s-nlp/russian_toxicity_classifier')
# text = st.text_area('введите любой текст')

# if text:
#     out = pipe(text)
#     st.json(out)