Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
"""
|
7 |
-
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
|
9 |
|
10 |
def respond(
|
@@ -40,9 +38,7 @@ def respond(
|
|
40 |
yield response
|
41 |
|
42 |
|
43 |
-
|
44 |
-
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
45 |
-
"""
|
46 |
demo = gr.ChatInterface(
|
47 |
respond,
|
48 |
additional_inputs=[
|
@@ -59,6 +55,5 @@ demo = gr.ChatInterface(
|
|
59 |
],
|
60 |
)
|
61 |
|
62 |
-
|
63 |
if __name__ == "__main__":
|
64 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from huggingface_hub import InferenceClient
|
3 |
|
4 |
+
# Initialize the InferenceClient with the model 'InfAI/parlbert-german-law'
|
5 |
+
client = InferenceClient("InfAI/parlbert-german-law")
|
|
|
|
|
6 |
|
7 |
|
8 |
def respond(
|
|
|
38 |
yield response
|
39 |
|
40 |
|
41 |
+
# Create the Gradio interface for chatbot interaction
|
|
|
|
|
42 |
demo = gr.ChatInterface(
|
43 |
respond,
|
44 |
additional_inputs=[
|
|
|
55 |
],
|
56 |
)
|
57 |
|
|
|
58 |
if __name__ == "__main__":
|
59 |
demo.launch()
|