Commit
•
1906023
1
Parent(s):
b71c69a
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
from huggingface_hub import get_hf_file_metadata, hf_hub_url
|
5 |
|
6 |
print(get_hf_file_metadata(hf_hub_url("eu-test/gpt2", "README.md")))
|
7 |
print(get_hf_file_metadata(hf_hub_url("eu-test/gpt2", "model.safetensors")))
|
8 |
|
|
|
|
|
9 |
generator = pipeline('text-generation', model='eu-test/gpt2')
|
10 |
|
11 |
def generate(text):
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
from huggingface_hub import get_hf_file_metadata, hf_hub_url, hub_hub_download
|
5 |
|
6 |
print(get_hf_file_metadata(hf_hub_url("eu-test/gpt2", "README.md")))
|
7 |
print(get_hf_file_metadata(hf_hub_url("eu-test/gpt2", "model.safetensors")))
|
8 |
|
9 |
+
hf_hub_download(repo_id="eu-test/gpt2", filename="64-8bits.tflite")
|
10 |
+
|
11 |
generator = pipeline('text-generation', model='eu-test/gpt2')
|
12 |
|
13 |
def generate(text):
|