Spaces:
Sleeping
Sleeping
Change model
Browse files- main.py +2 -1
- static/index.html +6 -6
- static/style.css +1 -0
main.py
CHANGED
@@ -6,7 +6,8 @@ from transformers import pipeline
|
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
9 |
-
|
|
|
10 |
|
11 |
@app.get("/infer_t5")
|
12 |
def t5(input):
|
|
|
6 |
|
7 |
app = FastAPI()
|
8 |
|
9 |
+
pipe = pipeline("text-generation", model="ai-forever/rugpt3large_based_on_gpt2")
|
10 |
+
|
11 |
|
12 |
@app.get("/infer_t5")
|
13 |
def t5(input):
|
static/index.html
CHANGED
@@ -10,24 +10,24 @@
|
|
10 |
<body>
|
11 |
<main>
|
12 |
<section id="text-gen">
|
13 |
-
<h1>Text generation using
|
14 |
<p>
|
15 |
Model:
|
16 |
<a
|
17 |
-
href="https://huggingface.co/
|
18 |
rel="noreferrer"
|
19 |
target="_blank"
|
20 |
-
>
|
21 |
>
|
22 |
</p>
|
23 |
<form class="text-gen-form">
|
24 |
-
<label for="text-gen-input"
|
25 |
<input
|
26 |
id="text-gen-input"
|
27 |
type="text"
|
28 |
-
value="
|
29 |
/>
|
30 |
-
<button id="text-gen-submit"
|
31 |
<p class="text-gen-output"></p>
|
32 |
</form>
|
33 |
</section>
|
|
|
10 |
<body>
|
11 |
<main>
|
12 |
<section id="text-gen">
|
13 |
+
<h1>Text generation using rugpt3large_based_on_gpt2 </h1>
|
14 |
<p>
|
15 |
Model:
|
16 |
<a
|
17 |
+
href="https://huggingface.co/ai-forever/rugpt3large_based_on_gpt2"
|
18 |
rel="noreferrer"
|
19 |
target="_blank"
|
20 |
+
>ai-forever/rugpt3large_based_on_gpt2</a
|
21 |
>
|
22 |
</p>
|
23 |
<form class="text-gen-form">
|
24 |
+
<label for="text-gen-input">Текст</label>
|
25 |
<input
|
26 |
id="text-gen-input"
|
27 |
type="text"
|
28 |
+
value="Что идет после понедельника?"
|
29 |
/>
|
30 |
+
<button id="text-gen-submit">Отправить</button>
|
31 |
<p class="text-gen-output"></p>
|
32 |
</form>
|
33 |
</section>
|
static/style.css
CHANGED
@@ -35,6 +35,7 @@ body {
|
|
35 |
}
|
36 |
|
37 |
button {
|
|
|
38 |
cursor: pointer;
|
39 |
}
|
40 |
|
|
|
35 |
}
|
36 |
|
37 |
button {
|
38 |
+
margin-top: 2rem;
|
39 |
cursor: pointer;
|
40 |
}
|
41 |
|