Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference UX, accept input data #1285

Merged
merged 24 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bug on main
  • Loading branch information
Benjamin committed Sep 25, 2023
commit b4b7ec65d6456c64461e2aef543b4f4e311ea4a1
8 changes: 5 additions & 3 deletions src/deepsparse/transformers/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def main(
task=task, # let pipeline determine if task is supported
model_path=model_path,
sequence_length=sequence_length,
sampling_temperature=sampling_temperature,
prompt_sequence_length=prompt_sequence_length,
)

Expand All @@ -153,8 +152,11 @@ def main(

# continue prompts until a keyboard interrupt
while data is None: # always True in interactive Mode
input_text = input(">>> ")
pipeline_inputs = {"prompt": [input_text]}
prompt_input = input(">>> ")
pipeline_inputs = dict(
prompt=[prompt_input],
sampling_temperature=sampling_temperature,
)

if SupportedTasks.is_chat(task):
pipeline_inputs["session_ids"] = session_ids
Expand Down