LutherYTT commited on
Commit
ee55fba
·
verified ·
1 Parent(s): 51b64ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -74,16 +74,16 @@ def predict(text: str):
74
 
75
  return {
76
  "情感": sentiment_map[pred_class],
77
- "評分": round(rating, 2),
78
- "喜悅": round(delight, 2),
79
- "憤怒": round(anger, 2),
80
- "悲傷": round(sorrow, 2),
81
- "快樂": round(happiness, 2),
82
  }
83
  except Exception as e:
84
  return {"错误": f"处理失败: {str(e)}"}
85
 
86
- article = "Author: Lu Yuk Tong, [Github](https://github.com/LutherYTT/Cantonese-Sentiment-Analysis-System-Multitasking-Learning-on-Scarce-Data)"
87
  # Create Gradio interface
88
  iface = gr.Interface(
89
  fn=predict,
 
74
 
75
  return {
76
  "情感": sentiment_map[pred_class],
77
+ "強度": round(rating, 2),
78
+ "": round(delight, 2),
79
+ "": round(anger, 2),
80
+ "": round(sorrow, 2),
81
+ "": round(happiness, 2),
82
  }
83
  except Exception as e:
84
  return {"错误": f"处理失败: {str(e)}"}
85
 
86
+ article = "Author: Lu Yuk Tong, [Github Link](https://github.com/LutherYTT/Cantonese-Sentiment-Analysis-System-Multitasking-Learning-on-Scarce-Data)"
87
  # Create Gradio interface
88
  iface = gr.Interface(
89
  fn=predict,