mickeyshi commited on
Commit
bb57028
1 Parent(s): 89dbd23

fixed js/css

Browse files
Files changed (2) hide show
  1. main.py +1 -1
  2. static/index.html +37 -24
main.py CHANGED
@@ -1,10 +1,10 @@
1
  from fastapi import FastAPI
2
  from fastapi.staticfiles import StaticFiles
3
  from fastapi.responses import FileResponse
 
4
 
5
  app = FastAPI()
6
 
7
- from transformers import pipeline
8
 
9
  pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
10
 
 
1
  from fastapi import FastAPI
2
  from fastapi.staticfiles import StaticFiles
3
  from fastapi.responses import FileResponse
4
+ from transformers import pipeline
5
 
6
  app = FastAPI()
7
 
 
8
 
9
  pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
10
 
static/index.html CHANGED
@@ -1,24 +1,37 @@
1
- <main>
2
- <section id="text-gen">
3
- <h2>Text generation using Flan T5</h2>
4
- <p>
5
- Model:
6
- <a
7
- href="https://huggingface.co/google/flan-t5-small"
8
- rel="noreferrer"
9
- target="_blank"
10
- >google/flan-t5-small
11
- </a>
12
- </p>
13
- <form class="text-gen-form">
14
- <label for="text-gen-input">Text prompt</label>
15
- <input
16
- id="text-gen-input"
17
- type="text"
18
- value="German: There are many ducks"
19
- />
20
- <button id="text-gen-submit">Submit</button>
21
- <p class="text-gen-output"></p>
22
- </form>
23
- </section>
24
- </main>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Fast API 🤗 Space served with Uvicorn</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+ <script type="module" src="script.js"></script>
9
+ </head>
10
+ <body>
11
+ <main>
12
+ <section id="text-gen">
13
+ <h2>Text generation using Flan T5</h2>
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
21
+ </a>
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="German: There are many ducks"
29
+ />
30
+ <button id="text-gen-submit">Submit</button>
31
+ <p class="text-gen-output"></p>
32
+ </form>
33
+ </section>
34
+ </main>
35
+ </body>
36
+
37
+ </html>