File size: 814 Bytes
48e9bca
 
 
e3ee235
 
48e9bca
95c8ae3
 
 
e3ee235
95c8ae3
 
 
e3ee235
 
 
95c8ae3
48e9bca
95c8ae3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

def choosistant(review_text,procon='Benefits'):
#waiting for model
    return "none yet" +' '+ review_text 

text_input = gr.Textbox(lines=8,placeholder="Enter the review text here...",label="Review Text")
new_title = gr.Textbox(label="Detected pro/con")
iface = gr.Interface(
    choosistant, [text_input],
    new_title,
    description ="Checkout some amazon reviews eg at [http://snap.stanford.edu/data/amazon/productGraph/categoryFiles/reviews_Musical_Instruments_5.json.gz](http://snap.stanford.edu/data/amazon/productGraph/categoryFiles/reviews_Musical_Instruments_5.json.gz)",
    allow_flagging="manual",
    flagging_options = ['Incorrect','Offensive', 'Other'],
    examples = [['The top side came ripped off'],
                ['The gear is child friendly']],
    )

iface.launch()