Joe7oo7 commited on
Commit
61334c6
·
verified ·
1 Parent(s): 897e561

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +2 -21
gradio_app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
3
 
4
  # Step 1: Load the pre-trained model
5
  # You can choose any suitable conversational model from the Hugging Face Model Hub
6
- chatbot = pipeline("conversational", model="microsoft/DialoGPT-small")
7
 
8
  # Step 2: Define the function that will process user input and return the model's response
9
  def respond(input_text):
@@ -20,26 +20,7 @@ iface = gr.Interface(
20
  description="Chat with an AI-powered bot based on a pre-trained model." # A short description
21
  )
22
 
23
- # Inject custom CSS
24
- iface.launch(inline=True, share=True, css="""
25
- body {
26
- background-color: orange !important; /* Make sure this is applied */
27
- border:10px solid white;
28
- }
29
- .container {
30
- max-width: 800px !important; /* Limit the width of the container */
31
- margin: auto;
32
- padding: 20px;
33
- }
34
- .gr-input {
35
- border: 2px solid #007bff !important; /* Use the correct class for Gradio input */
36
- border-radius: 4px;
37
- }
38
- .gr-output {
39
- color: black !important; /* Ensure this is not overridden */
40
- font-size: 1.2em !important;
41
- }
42
- """)
43
 
44
  # Step 4: Launch the interface
45
  if __name__ == "__main__":
 
3
 
4
  # Step 1: Load the pre-trained model
5
  # You can choose any suitable conversational model from the Hugging Face Model Hub
6
+ chatbot = pipeline("conversational", model="microsoft/DialoGPT-large")
7
 
8
  # Step 2: Define the function that will process user input and return the model's response
9
  def respond(input_text):
 
20
  description="Chat with an AI-powered bot based on a pre-trained model." # A short description
21
  )
22
 
23
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  # Step 4: Launch the interface
26
  if __name__ == "__main__":