File tree Expand file tree Collapse file tree 6 files changed +6
-6
lines changed
Expand file tree Collapse file tree 6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1818
1919def extractive_question_answering (temperature = 0 ):
2020 """Extractive Question Answering with a Large Language Model."""
21- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
21+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
2222 response = model .predict (
2323 '''Background: There is evidence that there have been significant changes \
2424 in Amazon rainforest vegetation over the last 21,000 years through the Last \
Original file line number Diff line number Diff line change 1818
1919def interview (temperature = .2 ):
2020 """Ideation example with a Large Language Model"""
21- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
21+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
2222 response = model .predict (
2323 'Give me ten interview questions for the role of program manager.' ,
2424 temperature = temperature ,
Original file line number Diff line number Diff line change 2323def list_tuned_models (project_id , location ):
2424 """List tuned models."""
2525 aiplatform .init (project = project_id , location = location )
26- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
26+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
2727 tuned_model_names = model .list_tuned_model_names ()
2828 print (tuned_model_names )
2929# [END generativeai_sdk_list_tuned_models]
Original file line number Diff line number Diff line change 1818
1919def sentiment_analysis (temperature = 0 ):
2020 """Sentiment analysis example with a Large Language Model."""
21- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
21+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
2222 response = model .predict (
2323 '''I had to compare two versions of Hamlet for my Shakespeare class and \
2424 unfortunately I picked this version. Everything from the acting (the actors \
Original file line number Diff line number Diff line change 1818
1919def text_summarization (temperature = .2 ):
2020 """Summarization Example with a Large Language Model"""
21- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
21+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
2222 response = model .predict (
2323 '''Provide a summary with about two sentences for the following article:
2424The efficient-market hypothesis (EMH) is a hypothesis in financial \
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def tuning(
4747 train_steps: Number of training steps to use when tuning the model.
4848 """
4949 aiplatform .init (project = project_id , location = location )
50- model = TextGenerationModel .from_pretrained ("google/ text-bison@001" )
50+ model = TextGenerationModel .from_pretrained ("text-bison@001" )
5151
5252 model .tune_model (
5353 training_data = training_data ,
You can’t perform that action at this time.
0 commit comments