Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import gradio as gr
|
|
| 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-
|
| 9 |
|
| 10 |
def generate(input, slider):
|
| 11 |
output = client.generate(input, max_new_tokens=slider).generated_text
|
|
|
|
| 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-7b-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
|