Spaces:
Runtime error
Runtime error
Fangyu Liu
commited on
Commit
·
800ade2
1
Parent(s):
f67adcd
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
# from PIL import Image
|
3 |
from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def _add_markup(table):
|
6 |
parts = [p.strip() for p in table.splitlines(keepends=False)]
|
|
|
1 |
import gradio as gr
|
2 |
# from PIL import Image
|
3 |
from transformers import Pix2StructForConditionalGeneration, Pix2StructProcessor
|
4 |
+
import os
|
5 |
+
|
6 |
+
##Bloom
|
7 |
+
API_URL = "https://api-inference.huggingface.co/models/bigscience/bloom"
|
8 |
+
HF_TOKEN = os.environ["HF_TOKEN"]
|
9 |
+
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
|
10 |
|
11 |
def _add_markup(table):
|
12 |
parts = [p.strip() for p in table.splitlines(keepends=False)]
|