Skip to content

Commit

Permalink
Pin typer version to avoid error
Browse files Browse the repository at this point in the history
  • Loading branch information
yirenlu92 committed Apr 4, 2024
1 parent 00e2233 commit 6f101d3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import modal

import webbrowser
import os

from .common import APP_NAME, VOLUME_CONFIG

stub = modal.Stub("example-axolotl-gui")
stub.q = modal.Queue.new() # Pass back the URL to auto-launch
q = modal.Queue.from_name(
"gui-queue", create_if_missing=True
) # Pass back the URL to auto-launch

gradio_image = modal.Image.debian_slim().pip_install("gradio==4.5.0")
gradio_image = modal.Image.debian_slim().pip_install("gradio==4.25.0", "typer==0.11.1")


@stub.function(image=gradio_image, volumes=VOLUME_CONFIG, timeout=3600)
Expand Down Expand Up @@ -170,7 +171,7 @@ def get_model_choices():
)

with modal.forward(8000) as tunnel:
stub.q.put(tunnel.url)
q.put(tunnel.url)
interface.launch(quiet=True, server_name="0.0.0.0", server_port=8000)


Expand All @@ -181,7 +182,7 @@ def main(
):
with open(config, "r") as cfg, open(data, "r") as dat:
handle = gui.spawn(cfg.read(), dat.read())
url = stub.q.get()
url = q.get()
print(f"GUI available at -> {url}\n")
webbrowser.open(url)
handle.get()

0 comments on commit 6f101d3

Please sign in to comment.