diff --git a/app.py b/app.py index 00c9e38..bd8ba7d 100644 --- a/app.py +++ b/app.py @@ -39,7 +39,6 @@ def medrecog(): return render_template('medrecog.html', response=response) else: return render_template('medrecog.html', response="Please provide a valid medical image.") - return render_template('medrecog.html') @app.route('/conditional', methods=['GET', 'POST']) @@ -53,30 +52,25 @@ def conditional(): prompt = f"""Imagine you are a medical expert and you are giving accurate medical advice to a patient. You are presented with a medical query and asked to provide a response with a detailed explanation. Note that dont mention any inaccurate or misleading information. - Medical Query: {user_input} - Key Details: - Provide precise information related to the patient's medical concern. - Indicate if any diagnostic tests or examinations have been performed. - Specify the current medications or treatments prescribed. - The response should be in a paragraph format but not in point-wise. - If only a specific disease name is mentioned, response must contain the symptoms, causes, and treatment of the disease with respective headings. - Guidelines: - Use clear and concise language. - The vocabulary should be appropriate for the medical context. - Include specific parameters or considerations within the medical context. - If the response contains a list of items, convert it into a paragraph format. - Avoid using abbreviations or acronyms. - - Avoid Headings and Sub hheadings just give me the complete response in a paragraph format. + - Avoid Headings and Sub headings just give me the complete response in a paragraph format. - Refrain from presenting inaccurate or ambiguous information. - Ensure the query is focused and not overly broad.""" gemini_response = gen_from_text(prompt) - return render_template('index.html', user_input=user_input, response=gemini_response) - return render_template('index.html')