Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,25 +32,26 @@ def predict_sentiment(text):
|
|
| 32 |
return label_names[pred_label]
|
| 33 |
|
| 34 |
demo_description = """
|
| 35 |
-
**This Space
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
| 48 |
|
| 49 |
demo = gr.Interface(
|
| 50 |
fn=predict_sentiment,
|
| 51 |
inputs="text",
|
| 52 |
outputs="text",
|
| 53 |
-
title="
|
| 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 |
)
|