pgurazada1 commited on
Commit
8f77b6f
·
verified ·
1 Parent(s): adcb131

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -24,7 +24,7 @@ def decision(png_file_path, client, lmm: str) -> str:
24
 
25
  image_data = generate_data_uri(png_file_path)
26
 
27
- user_message = """
28
  You are an expert in cricket tasked to judge whether a batter is out by Leg Before Wicket (LBW). You will be presented with an image of the ball hitting a batter's pads and you will have to make a decision whether the batter is to be judged out or not applying the following rules.
29
 
30
  There are three important zones to consider while making your decision.
@@ -47,10 +47,13 @@ def decision(png_file_path, client, lmm: str) -> str:
47
  """
48
 
49
  decision_prompt = [
 
 
 
 
50
  {
51
  'role': 'user',
52
  'content': [
53
- {"type": "text", "text": user_message},
54
  {"type": "image_url", "image_url": {"url": image_data}}
55
  ]
56
  }
 
24
 
25
  image_data = generate_data_uri(png_file_path)
26
 
27
+ system_message = """
28
  You are an expert in cricket tasked to judge whether a batter is out by Leg Before Wicket (LBW). You will be presented with an image of the ball hitting a batter's pads and you will have to make a decision whether the batter is to be judged out or not applying the following rules.
29
 
30
  There are three important zones to consider while making your decision.
 
47
  """
48
 
49
  decision_prompt = [
50
+ {
51
+ 'role': 'system',
52
+ 'content': system_message
53
+ },
54
  {
55
  'role': 'user',
56
  'content': [
 
57
  {"type": "image_url", "image_url": {"url": image_data}}
58
  ]
59
  }