OmkarGhugarkar commited on
Commit
32532af
1 Parent(s): 35efc3d
Files changed (1) hide show
  1. utils.py +4 -5
utils.py CHANGED
@@ -66,14 +66,13 @@ def summary(input_json):
66
  promptShort = prompt.iloc[:,1].to_list()
67
  promptLong = prompt.iloc[:,2].to_list()
68
 
69
- id = desc_list.index(input_json['Descriptor'])
70
  output = {}
71
  filtering_results = filter(input_json)
72
  if filtering_results[0] == 0:
73
- return 0
74
- #return filtering_results[1]
75
 
76
-
77
  long_text = filtering_results[1]
78
 
79
  output['mobile'] = call(promptShort[id], long_text)
@@ -95,7 +94,7 @@ def summary(input_json):
95
 
96
  prompt = "Answer in one word the sentiment of this News out of Positive, Negative or Neutral {}"
97
  output['sentiment'] = call(prompt, output['web'])
98
-
99
  # response = client.images.generate(
100
  # model="dall-e-3",
101
  # prompt=headline.text,
 
66
  promptShort = prompt.iloc[:,1].to_list()
67
  promptLong = prompt.iloc[:,2].to_list()
68
 
 
69
  output = {}
70
  filtering_results = filter(input_json)
71
  if filtering_results[0] == 0:
72
+ #return 0
73
+ return filtering_results[1]
74
 
75
+ id = desc_list.index(input_json['Descriptor'])
76
  long_text = filtering_results[1]
77
 
78
  output['mobile'] = call(promptShort[id], long_text)
 
94
 
95
  prompt = "Answer in one word the sentiment of this News out of Positive, Negative or Neutral {}"
96
  output['sentiment'] = call(prompt, output['web'])
97
+
98
  # response = client.images.generate(
99
  # model="dall-e-3",
100
  # prompt=headline.text,