ultrin commited on
Commit
78d4d36
1 Parent(s): 4e0d45e

Change model

Browse files
Files changed (3) hide show
  1. main.py +2 -1
  2. static/index.html +6 -6
  3. static/style.css +1 -0
main.py CHANGED
@@ -6,7 +6,8 @@ from transformers import pipeline
6
 
7
  app = FastAPI()
8
 
9
- pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
 
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 Flan T5</h1>
14
  <p>
15
  Model:
16
  <a
17
- href="https://huggingface.co/google/flan-t5-small"
18
  rel="noreferrer"
19
  target="_blank"
20
- >google/flan-t5-small</a
21
  >
22
  </p>
23
  <form class="text-gen-form">
24
- <label for="text-gen-input">Text prompt</label>
25
  <input
26
  id="text-gen-input"
27
  type="text"
28
- value="English: Translate There are many ducks. German:"
29
  />
30
- <button id="text-gen-submit">Submit</button>
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