Skip to content

Commit

Permalink
Merge pull request #30 from markstur/fix_gradio
Browse files Browse the repository at this point in the history
  Fix to work with updated gradio
  • Loading branch information
bridgetmcg authored Jan 11, 2024
2 parents b252d6d + d79f381 commit 7d9ef44
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
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

0 comments on commit 7d9ef44

Please sign in to comment.