Update src/classification_module/dio_support_detector.py
Browse files
    	
        src/classification_module/dio_support_detector.py
    CHANGED
    
    | @@ -116,11 +116,11 @@ def detect_glorification( | |
| 116 | 
             
                    )
         | 
| 117 |  | 
| 118 | 
             
                    input_text = {
         | 
| 119 | 
            -
                        "context": f"Analyze the  | 
| 120 | 
            -
                        "question": "Does the  | 
| 121 | 
             
                    }
         | 
| 122 |  | 
| 123 | 
            -
                    response = requests.post(f'{mistral_public_url}/mistral-inference', json=input_text, stream=False)
         | 
| 124 |  | 
| 125 | 
             
                    detect_entity_support.update({
         | 
| 126 | 
             
                        "aspect_sentiment": response.text.strip()
         | 
|  | |
| 116 | 
             
                    )
         | 
| 117 |  | 
| 118 | 
             
                    input_text = {
         | 
| 119 | 
            +
                        "context": f"Analyze the included **User Input Text** to determine if it glorifies, supports, or speaks neutrally or negatively about the entity described in **Entity information.**\n\n\n\n\n##CONTEXT INPUTS TO BE CLASSIFIED:\n**User Input Text**: {user_input}\n\n**Entity information**: {detect_entity_support['entity_info']}",
         | 
| 120 | 
            +
                        "question": "Does the above **User Input Text** glorify, support, or speak neutrally or negatively about the entity? Classify the opinion expressed by the text *towards the mentioned entity* as one of Glorification, Support, Neutral, Negative. Do not include your reasoning for the classification in your answer.\nThe above **User Input Text's** opinion expressed towards the mentioned **Entity** is:"
         | 
| 121 | 
             
                    }
         | 
| 122 |  | 
| 123 | 
            +
                    response = requests.post(f'{mistral_public_url}/mistral-sentiment-inference', json=input_text, stream=False)
         | 
| 124 |  | 
| 125 | 
             
                    detect_entity_support.update({
         | 
| 126 | 
             
                        "aspect_sentiment": response.text.strip()
         |