Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
-
import
|
2 |
-
import
|
3 |
-
|
|
|
|
|
|
|
4 |
|
5 |
# Use the base model's ID
|
6 |
base_model_id = "mistralai/Mistral-7B-v0.1"
|
@@ -30,19 +33,19 @@ class ChatBot:
|
|
30 |
return response
|
31 |
|
32 |
bot = ChatBot()
|
33 |
-
|
34 |
-
title = "👋🏻Welcome to Tonic's EZ Chat🚀"
|
35 |
-
description = "You can use this Space to test out the current model (MistralMed) or duplicate this Space and use it for any other model on 🤗HuggingFace. Join me on [Discord](https://discord.gg/fpEPNZGsbt) to build together."
|
36 |
-
examples = [["What is the boiling point of nitrogen"]]
|
37 |
-
|
38 |
-
iface = gr.Interface(
|
39 |
-
fn=bot.predict,
|
40 |
-
title=title,
|
41 |
-
description=description,
|
42 |
-
examples=examples,
|
43 |
-
inputs="text",
|
44 |
-
outputs="text",
|
45 |
-
theme="ParityError/Anime"
|
46 |
-
)
|
47 |
-
|
48 |
-
iface.launch()
|
|
|
1 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
# api token for huggingface.co
|
5 |
+
api_token = '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'
|
6 |
+
|
7 |
|
8 |
# Use the base model's ID
|
9 |
base_model_id = "mistralai/Mistral-7B-v0.1"
|
|
|
33 |
return response
|
34 |
|
35 |
bot = ChatBot()
|
36 |
+
|
37 |
+
title = "👋🏻Welcome to Tonic's EZ Chat🚀"
|
38 |
+
description = "You can use this Space to test out the current model (MistralMed) or duplicate this Space and use it for any other model on 🤗HuggingFace. Join me on [Discord](https://discord.gg/fpEPNZGsbt) to build together."
|
39 |
+
examples = [["What is the boiling point of nitrogen"]]
|
40 |
+
|
41 |
+
iface = gr.Interface(
|
42 |
+
fn=bot.predict,
|
43 |
+
title=title,
|
44 |
+
description=description,
|
45 |
+
examples=examples,
|
46 |
+
inputs="text",
|
47 |
+
outputs="text",
|
48 |
+
theme="ParityError/Anime"
|
49 |
+
)
|
50 |
+
|
51 |
+
iface.launch()
|