SelmaNajih001 commited on
Commit
f4175d7
·
verified ·
1 Parent(s): c53a02d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -10,8 +10,6 @@ from huggingface_hub import login
10
  hf_token = os.environ["HF_TOKEN"]
11
  login(token=hf_token)
12
 
13
-
14
- # Carica modello GRPO fine-tuned
15
  model_name = "SelmaNajih001/GRPORagMinstral2"
16
  tokenizer = AutoTokenizer.from_pretrained(model_name)
17
  pipe = pipeline(
@@ -71,8 +69,8 @@ def analisi_finanziaria(query, k=3):
71
 
72
  import gradio as gr
73
 
74
- # Examples from your thesis
75
  examples = [
 
76
  "Trump imposes tariffs",
77
  "Tesla announces a new affordable electric vehicle model",
78
  "Nvidia releases new GPU technology",
@@ -98,9 +96,9 @@ This tool analyzes financial events using a retrieval-augmented **language model
98
  Click an example below to quickly test the model.
99
  """
100
 
101
- # Create Gradio interface
102
  iface = gr.Interface(
103
- fn=analisi_finanziaria, # your actual function
104
  inputs=gr.Textbox(label="Enter financial event", placeholder="Type an event here..."),
105
  outputs=gr.Textbox(label="Prediction"),
106
  title="GRPO Financial Analyst",
 
10
  hf_token = os.environ["HF_TOKEN"]
11
  login(token=hf_token)
12
 
 
 
13
  model_name = "SelmaNajih001/GRPORagMinstral2"
14
  tokenizer = AutoTokenizer.from_pretrained(model_name)
15
  pipe = pipeline(
 
69
 
70
  import gradio as gr
71
 
 
72
  examples = [
73
+ "Deep Seek published a new AI better than OpenAI without using Nvidia's Chips",
74
  "Trump imposes tariffs",
75
  "Tesla announces a new affordable electric vehicle model",
76
  "Nvidia releases new GPU technology",
 
96
  Click an example below to quickly test the model.
97
  """
98
 
99
+ # Gradio interface
100
  iface = gr.Interface(
101
+ fn=analisi_finanziaria,
102
  inputs=gr.Textbox(label="Enter financial event", placeholder="Type an event here..."),
103
  outputs=gr.Textbox(label="Prediction"),
104
  title="GRPO Financial Analyst",