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

Fix to work with updated gradio #30

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion caikit_huggingface_demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def start_frontend(backend, inference_service):
channel = grpc.insecure_channel(target)
frontend = get_frontend(channel, inference_service, module_models)
print(f"▶️ Starting the frontend gradio UI with using backend target={target}")
frontend.launch(share=False, show_tips=False)
frontend.launch(share=False)
print("⏹️ Stopped")


Expand Down
2 changes: 1 addition & 1 deletion caikit_huggingface_demo/client/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def fn(self, model, text_in):
columns = []
rows = []
for k in response.output:
columns.append(k.input)
columns.append(str(k.input))

for r, _ in enumerate(response.output[0].output):
row = []
Expand Down
7 changes: 5 additions & 2 deletions caikit_huggingface_demo/client/image_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ def optional_tab(cls, models, request, predict):
with gr.Column():
inputs = gr.Image(label="Input Image")
output_image = gr.Gallery(
label="Output Masks", show_label=True
).style(preview=True, object_fit="scale-down")
label="Output Masks",
show_label=True,
preview=True,
object_fit="scale-down",
)
with gr.Column():
outputs = gr.Label(label="Segments Detected")
inputs.change(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ timm==0.9.1
sentence-transformers==2.2.2
transformers[torch]==4.30.0
# frontend only
gradio==3.36.1
gradio==4.11.0
grpcio==1.53.2