carblacac commited on
Commit
2f73a94
·
1 Parent(s): 2ad69fa

Update app.py

Browse files

add title and description

Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -28,8 +28,12 @@ def inference(text: str) -> str:
28
  max_vale = max(predictions)
29
  idx = predictions.index(max_vale)
30
  return model.config.id2label[idx]
31
-
 
 
 
 
32
  examples = ['Tomorrow I will celebrate my birthday!', 'I was shocked when I saw the movie']
33
 
34
- iface = gr.Interface(fn=inference, inputs="text", outputs="text", examples=examples)
35
  iface.launch()
 
28
  max_vale = max(predictions)
29
  idx = predictions.index(max_vale)
30
  return model.config.id2label[idx]
31
+
32
+ title = "Classify the feeling of your sentence"
33
+ description = """
34
+ <p style="text-align:center">The model has been trained to classify the feeling of the texts, between sadness, joy, love, anger, fear or surprise. Test it!</p>
35
+ """
36
  examples = ['Tomorrow I will celebrate my birthday!', 'I was shocked when I saw the movie']
37
 
38
+ iface = gr.Interface(fn=inference, theme="huggingface", css=".footer {display: none !important}", inputs="text", outputs="text", title=title, description=description, examples=examples)
39
  iface.launch()