Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
build: path issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex committed Apr 18, 2023
1 parent 83b1afc commit a6943a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/Predict.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
<main>
<iframe
title="Gradio instance prediction UI"
src={window.location.origin + "/api/gradio"} />
src={location.protocol +
"//" +
location.host +
location.pathname +
"api/gradio"} />
</main>

<style>
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/instance-views/InstanceView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
}
try {
import(window.location.origin + "/cache/view.mjs").then((m) => {
let import_path =
location.protocol +
"//" +
location.host +
location.pathname +
"cache/view.mjs";
import(import_path).then((m) => {
if (m.getOptions) {
optionsFunction = m.getOptions;
} else {
Expand Down

0 comments on commit a6943a5

Please sign in to comment.