Skip to content

Commit

Permalink
Added argparse for screen vs camera mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Farabet committed Dec 17, 2024
1 parent 379912b commit dacb16b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gemini-2/live_api_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
import PIL.Image
import mss

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=str, default='camera', help='pixels to stream from', choices=['camera', 'screen'])
args = parser.parse_args()

from google import genai

if sys.version_info < (3, 11, 0):
Expand All @@ -45,8 +51,7 @@

MODEL = "models/gemini-2.0-flash-exp"

MODE = "camera"
#MODE = "screen"
MODE = args.mode

client = genai.Client(http_options={"api_version": "v1alpha"})

Expand Down

0 comments on commit dacb16b

Please sign in to comment.