Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,16 @@ import os
|
|
3 |
from flask import Flask, request, jsonify
|
4 |
from transformers import pipeline
|
5 |
|
|
|
6 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
llm = pipeline("text-generation", model="tiiuae/falcon-1b-instruct") # 1B model instead of 7B
|
9 |
|
10 |
|
11 |
|
|
|
3 |
from flask import Flask, request, jsonify
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
|
7 |
from transformers import pipeline
|
8 |
+
from huggingface_hub import login
|
9 |
+
|
10 |
+
# Log in with your Hugging Face token
|
11 |
+
login(token="your_huggingface_token")
|
12 |
+
|
13 |
+
# Load the model
|
14 |
+
llm = pipeline("text-generation", model="tiiuae/falcon-1b-instruct")
|
15 |
|
|
|
16 |
|
17 |
|
18 |
|