Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
chore: style black
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Dec 27, 2023
1 parent f85b0e6 commit ad6ae55
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bardapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ def get_answer(
source="auto", target=self.language
).translate
else:

def translator_func(text):
return google_official_translator(
text, target_language=self.language
Expand Down Expand Up @@ -698,14 +699,18 @@ def ask_about_image(
translator_to_eng = GoogleTranslator(source="auto", target="en")
translated_input_text = translator_to_eng.translate(input_text)


# Supported format: jpeg, png, webp
image_url = upload_image(image)

input_data_struct = [
None,
[
[translated_input_text, 0, None, [[[image_url, 1], "uploaded_photo.jpg"]]],
[
translated_input_text,
0,
None,
[[[image_url, 1], "uploaded_photo.jpg"]],
],
[lang if lang is not None else self.language],
["", "", ""],
"", # Unknown random string value (1000 characters +)
Expand Down

0 comments on commit ad6ae55

Please sign in to comment.