Upload folder using huggingface_hub
Browse files- Dockerfile +13 -0
- demo.yaml +34 -0
- requirements.txt +2 -0
Dockerfile
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
+
|
9 |
+
COPY . .
|
10 |
+
|
11 |
+
RUN mkdir ./.cache
|
12 |
+
|
13 |
+
CMD ["lite", "demo.yaml", "launch", "--server_name", "0.0.0.0", "--server_port", "7860"]
|
demo.yaml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
lite_metadata:
|
2 |
+
gradio_version: 3.31.0
|
3 |
+
class_string: gradio.interface.Interface
|
4 |
+
kwargs:
|
5 |
+
title: Gradio Webapp made with Gitio
|
6 |
+
description: Given a string s, find the length of the longest substring without
|
7 |
+
repeating characters.
|
8 |
+
article: null
|
9 |
+
thumbnail: null
|
10 |
+
theme: gradio/seafoam
|
11 |
+
css: null
|
12 |
+
allow_flagging: "never"
|
13 |
+
inputs:
|
14 |
+
class_string: liteobj.listify
|
15 |
+
args:
|
16 |
+
- class_string: gradio.components.Textbox
|
17 |
+
kwargs:
|
18 |
+
label: s
|
19 |
+
outputs:
|
20 |
+
class_string: liteobj.listify
|
21 |
+
args:
|
22 |
+
- class_string: gradio.components.Number
|
23 |
+
kwargs:
|
24 |
+
label: output
|
25 |
+
precision: 0
|
26 |
+
fn:
|
27 |
+
class_string: liteobj.compile_callable
|
28 |
+
kwargs:
|
29 |
+
source: "def func(s):\n start = maxLength = 0\n usedChar = {}\n for\
|
30 |
+
\ i in range(len(s)):\n if s[i] in usedChar and start <= usedChar[s[i]]:\n\
|
31 |
+
\ start = usedChar[s[i]] + 1\n else:\n maxLength\
|
32 |
+
\ = max(maxLength, i - start + 1)\n usedChar[s[i]] = i\n return\
|
33 |
+
\ maxLength\n"
|
34 |
+
target_name: func
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
gradio==3.31
|
2 |
+
liteobj==0.0.3
|