Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
#Back to Lesson 2, time flies!
|
2 |
from text_generation import Client
|
3 |
import gradio as gr
|
|
|
|
|
|
|
4 |
#FalcomLM-instruct endpoint on the text_generation library
|
5 |
client = Client("https://api-inference.huggingface.co/models/tiiuae/falcon-40b-instruct", headers={"Authorization": f"Bearer {hf_api_key}"}, timeout=120)
|
6 |
-
hf_api_key = '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'
|
7 |
|
8 |
def generate(input, slider):
|
9 |
output = client.generate(input, max_new_tokens=slider).generated_text
|
|
|
1 |
#Back to Lesson 2, time flies!
|
2 |
from text_generation import Client
|
3 |
import gradio as gr
|
4 |
+
|
5 |
+
hf_api_key = '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'
|
6 |
+
|
7 |
#FalcomLM-instruct endpoint on the text_generation library
|
8 |
client = Client("https://api-inference.huggingface.co/models/tiiuae/falcon-40b-instruct", headers={"Authorization": f"Bearer {hf_api_key}"}, timeout=120)
|
|
|
9 |
|
10 |
def generate(input, slider):
|
11 |
output = client.generate(input, max_new_tokens=slider).generated_text
|