Fetching metadata from the HF Docker repository...
-
Update requirements.txt
-
Update app.py
-
Update app.py
-
Update requirements.txt
-
Update app.py
-
Update app.py
import gradio as gr
from transformers import pipeline
# Load the model
generator = pipeline("text-generation", model="EleutherAI/gpt-neo-2.7B")
# Define the chatbot function
def chatbot(input_text):
response = generator(input_text, max_length=100, num_return_sequences=1)
return response[0]['generated_text']
# Gradio interface
iface = gr.Interface(fn=chatbot, inputs="text", outputs="text")
if __name__ == "__main__":
iface.launch() -
initial commit
-
Duplicate from gradio-templates/chatbot

Ozgun111 +1: pngwn Co-authored-by: Pete <pngwn@users.noreply.huggingface.co>