zack commited on
Commit
89c0e23
β€’
1 Parent(s): 816c2fe

πŸ› fix(importer): address issues in importer component

Browse files
frontend/components/Modal/importer.js CHANGED
@@ -110,8 +110,8 @@ function Shared(props){
110
 
111
  const isFetchable = async (url) => {
112
  const pattern = {
113
- share : /^https?:\/\/*([0-9]{5})*(-gradio)*(.app)?(\/)?$/,
114
- hugginFace : /^https?:\/\/*(hf.space)\/*(embed)\/*([a-zA-Z0-9+_-]+)\/*([a-zA-Z0-9+_-]+)\/*([+])?(\/)?$/
115
  }
116
 
117
  if (!pattern.share.test(url) &&
 
110
 
111
  const isFetchable = async (url) => {
112
  const pattern = {
113
+ share : new RegExp("^https?:\\/\\/([0-9a-zA-Z-]+)\\.gradio\\.live\\/?"),
114
+ hugginFace : new RegExp("^https?:\\/\\/([a-zA-Z0-9-]+)-gradio\\.hf\\.space\\/?$")
115
  }
116
 
117
  if (!pattern.share.test(url) &&