Raghavan1988 commited on
Commit
93855fe
·
1 Parent(s): 2f48a1c

print statements

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -125,6 +125,10 @@ def bot(
125
  stop_sequences=preprocess_stop_sequences(stop_sequences=stop_sequences),
126
  top_k=top_k,
127
  top_p=top_p)
 
 
 
 
128
 
129
  if files:
130
  text_prompt = [chatbot[-1][0]] \
@@ -132,6 +136,11 @@ def bot(
132
  else []
133
  image_prompt = [Image.open(file).convert('RGB') for file in files]
134
  model = genai.GenerativeModel('gemini-pro-vision')
 
 
 
 
 
135
  response = model.generate_content(
136
  text_prompt + image_prompt,
137
  stream=True,
@@ -140,8 +149,12 @@ def bot(
140
  text_prompt = [chatbot[-1][0]] \
141
  if chatbot[-1][0] and isinstance(chatbot[-1][0], str) \
142
  else []
 
143
  if (language.startswith("en") == False):
144
  text_prompt = [translate_to_english(text_prompt[0])]
 
 
 
145
  model = genai.GenerativeModel('gemini-pro')
146
 
147
 
 
125
  stop_sequences=preprocess_stop_sequences(stop_sequences=stop_sequences),
126
  top_k=top_k,
127
  top_p=top_p)
128
+
129
+
130
+
131
+
132
 
133
  if files:
134
  text_prompt = [chatbot[-1][0]] \
 
136
  else []
137
  image_prompt = [Image.open(file).convert('RGB') for file in files]
138
  model = genai.GenerativeModel('gemini-pro-vision')
139
+ print(text_prompt)
140
+ if (language.startswith("en") == False):
141
+ text_prompt = [translate_to_english(text_prompt[0])]
142
+ print(text_prompt)
143
+
144
  response = model.generate_content(
145
  text_prompt + image_prompt,
146
  stream=True,
 
149
  text_prompt = [chatbot[-1][0]] \
150
  if chatbot[-1][0] and isinstance(chatbot[-1][0], str) \
151
  else []
152
+ print(text_prompt)
153
  if (language.startswith("en") == False):
154
  text_prompt = [translate_to_english(text_prompt[0])]
155
+ print(text_prompt)
156
+
157
+
158
  model = genai.GenerativeModel('gemini-pro')
159
 
160