Pezh commited on
Commit
f296f09
·
verified ·
1 Parent(s): 2a6473b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,7 +41,7 @@ safety_settings = [
41
  "threshold": "BLOCK_MEDIUM_AND_ABOVE"
42
  },
43
  ]
44
- text_input = st.text_input('Enter some text')
45
 
46
  model = genai.GenerativeModel(model_name="gemini-pro",
47
  generation_config=generation_config,
@@ -56,10 +56,10 @@ l.append(response)
56
  #to_markdown(response.text)
57
 
58
  # Set up the title of the app
59
- st.title('Simple Streamlit App')
60
 
61
  # File uploader to allow users to upload images
62
- uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
63
 
64
  mod = genai.GenerativeModel('gemini-pro-vision')
65
 
@@ -80,7 +80,7 @@ if uploaded_file is not None:
80
  #text_input = st.text_input('Enter some text')
81
 
82
  # Button to print the text from input
83
- if st.button('Print Text'):
84
  translator = GoogleTranslator(source='en', target='fa')
85
 
86
  # Translate the text to Persian
 
41
  "threshold": "BLOCK_MEDIUM_AND_ABOVE"
42
  },
43
  ]
44
+ text_input = st.text_input('سوالتان را در مورد علایم، داروها، عوارض و یا آزمایشات دیابت بپرسید', placeholder='من بیمار مبتلا به دیابت و سکته قلبی هستم و از متفورمین و پیوگلیتازون مصرف میکنم، این داروهارو چجوری مصرف کنم و آیا عوارضی خواهند داشت با توجه به بسکته قلبی که داشته‌ام؟')
45
 
46
  model = genai.GenerativeModel(model_name="gemini-pro",
47
  generation_config=generation_config,
 
56
  #to_markdown(response.text)
57
 
58
  # Set up the title of the app
59
+ #st.title('Simple Streamlit App')
60
 
61
  # File uploader to allow users to upload images
62
+ uploaded_file = st.file_uploader("عکس زخمتان را بفرستید", type=["jpg", "jpeg", "png"])
63
 
64
  mod = genai.GenerativeModel('gemini-pro-vision')
65
 
 
80
  #text_input = st.text_input('Enter some text')
81
 
82
  # Button to print the text from input
83
+ if st.button('بپرس'):
84
  translator = GoogleTranslator(source='en', target='fa')
85
 
86
  # Translate the text to Persian