Spaces:
Runtime error
Runtime error
Better heuristic for the host name
Browse files
run.exs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
host =
|
| 2 |
if repo_name = System.get_env("SPACE_REPO_NAME") do
|
| 3 |
-
"#{System.get_env("SPACE_AUTHOR_NAME")}-#{
|
|
|
|
|
|
|
| 4 |
else
|
| 5 |
"localhost"
|
| 6 |
end
|
|
|
|
| 1 |
host =
|
| 2 |
if repo_name = System.get_env("SPACE_REPO_NAME") do
|
| 3 |
+
"#{System.get_env("SPACE_AUTHOR_NAME")}-#{repo_name}.hf.space"
|
| 4 |
+
|> String.replace("_", "-")
|
| 5 |
+
|> String.downcase(:ascii)
|
| 6 |
else
|
| 7 |
"localhost"
|
| 8 |
end
|