diff --git a/README.md b/README.md index ff70f0b..c0bf3a2 100644 --- a/README.md +++ b/README.md @@ -223,19 +223,19 @@ print(gpt_4_model) # Model Predict -model_prediction = Model("https://clarifai.com/anthropic/completion/models/claude-v2").predict_by_bytes(b"Write a tweet on future of AI", input_type="text") +model_prediction = Model("https://clarifai.com/anthropic/completion/models/claude-v2").predict_by_bytes(b"Write a tweet on future of AI") # Customizing Model Inference Output -model_prediction = gpt_4_model.predict_by_bytes(b"Write a tweet on future of AI", "text", inference_params=dict(temperature=str(0.7), max_tokens=30)) +model_prediction = gpt_4_model.predict_by_bytes(b"Write a tweet on future of AI", inference_params=dict(temperature=str(0.7), max_tokens=30)) # Return predictions having prediction confidence > 0.98 -model_prediction = model.predict_by_filepath(filepath="local_filepath", input_type, output_config={"min_value": 0.98}) # Supports image, text, audio, video +model_prediction = model.predict_by_filepath(filepath="local_filepath", output_config={"min_value": 0.98}) # Supports image, text, audio, video # Supports prediction by url -model_prediction = model.predict_by_url(url="url", input_type) # Supports image, text, audio, video +model_prediction = model.predict_by_url(url="url") # Supports image, text, audio, video # Return predictions for specified interval of video video_input_proto = [input_obj.get_input_from_url("Input_id", video_url=BEER_VIDEO_URL)] -model_prediction = model.predict(video_input_proto, input_type="video", output_config={"sample_ms": 2000}) +model_prediction = model.predict(video_input_proto, output_config={"sample_ms": 2000}) ``` #### Model Training ```python @@ -345,12 +345,12 @@ from clarifai.client.workflow import Workflow # Workflow Predict workflow = Workflow("workflow_url") # Example: https://clarifai.com/clarifai/main/workflows/Face-Sentiment -workflow_prediction = workflow.predict_by_url(url="url", input_type="image") # Supports image, text, audio, video +workflow_prediction = workflow.predict_by_url(url="url") # Supports image, text, audio, video # Customizing Workflow Inference Output workflow = Workflow(user_id="user_id", app_id="app_id", workflow_id="workflow_id", output_config={"min_value": 0.98}) # Return predictions having prediction confidence > 0.98 -workflow_prediction = workflow.predict_by_filepath(filepath="local_filepath", input_type="text") # Supports image, text, audio, video +workflow_prediction = workflow.predict_by_filepath(filepath="local_filepath") # Supports image, text, audio, video ``` #### Workflows Listing