Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
-
from transformers import AutoModelForCausalLM
|
| 4 |
-
import spaces
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
"""
|
| 8 |
-
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
| 9 |
-
"""
|
| 10 |
|
| 11 |
|
| 12 |
token = os.environ["HF_TOKEN"]
|
|
@@ -45,9 +39,6 @@ def respond(
|
|
| 45 |
response += token
|
| 46 |
yield response
|
| 47 |
|
| 48 |
-
"""
|
| 49 |
-
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 50 |
-
"""
|
| 51 |
demo = gr.ChatInterface(
|
| 52 |
respond,
|
| 53 |
additional_inputs=[
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
+
from transformers import AutoModelForCausalLM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
token = os.environ["HF_TOKEN"]
|
|
|
|
| 39 |
response += token
|
| 40 |
yield response
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
demo = gr.ChatInterface(
|
| 43 |
respond,
|
| 44 |
additional_inputs=[
|