ChienChung commited on
Commit
3b92a03
·
verified ·
1 Parent(s): ae6b859

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -32,25 +32,26 @@ def predict_sentiment(text):
32
  return label_names[pred_label]
33
 
34
  demo_description = """
35
- **This Space uses the FinBERT model for 3-class financial sentiment classification (positive, negative, neutral).**
36
- Simply input a financial news headline or sentence to see its sentiment classification.
37
-
38
- **How to Use**:
39
- 1. Enter a financial news headline or short financial text.
40
- 2. Click "Submit".
41
- 3. View the predicted sentiment: positive, negative, or neutral.
42
-
43
- **Sample Inputs**:
44
- 1. Finnish Componenta has published its new long-term strategy for the period 2011-2015 with the aim of growing together with its customers.
45
- 2. Sales in UK decreased by 10.5% in January, while sales outside UK dropped by 17%.
46
- 3. The agreement was signed with Biohit Healthcare Ltd, a UK-based subsidiary of Biohit Oyj.
47
- """
 
48
 
49
  demo = gr.Interface(
50
  fn=predict_sentiment,
51
  inputs="text",
52
  outputs="text",
53
- title="FinBERT Financial Sentiment Classifier",
54
  description=demo_description,
55
  allow_flagging="never"
56
  )
 
32
  return label_names[pred_label]
33
 
34
  demo_description = """
35
+ **This Space showcases a LoRA-fine-tuned LLaMA model for 3-class financial sentiment classification (negative/neutral/positive). Simply input a headline or short text related to finance, and the model will predict its sentiment**.
36
+
37
+ **How to Use**:
38
+ 1. Enter text: Type or paste a financial news headline (or any short text) into the text box.
39
+ 2. Submit: Click the Submit button.
40
+ 3. View result: The predicted sentiment label—negative, neutral, or positive
41
+
42
+ **Sample Questions**:
43
+ 1. Finnish Componenta has published its new long-term strategy for the period 2011-2015 with the aim of growing together with its customers .
44
+ 2. Sales in UK decreased by 10.5 % in January , while sales outside UK dropped by 17 % .
45
+ 3. Rinkuskiai 's beer sales fell by 6.5 per cent to 4.16 million litres , while Kauno Alus ' beer sales jumped by 6.9 per cent to 2.48 million litres .
46
+ 4. The 2015 target for net sales has been set at GBP 1bn and the target for return on investment at over 20 % .
47
+ 5. The agreement was signed with Biohit Healthcare Ltd , the UK-based subsidiary of Biohit Oyj , a Finnish public company which develops , manufactures and markets liquid handling products and diagnostic test systems .
48
+ """
49
 
50
  demo = gr.Interface(
51
  fn=predict_sentiment,
52
  inputs="text",
53
  outputs="text",
54
+ title="LLaMA LoRA Financial News Headline Sentiment Demo",
55
  description=demo_description,
56
  allow_flagging="never"
57
  )