Skip to content
View PANKAJNAGAR433's full-sized avatar

Block or report PANKAJNAGAR433

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
PANKAJNAGAR433/README.md

from flask import Flask, request, jsonify from transformers import pipeline

app = Flask(name)

Load the conversational model

chatbot = pipeline('conversational', model='microsoft/DialoGPT-medium')

@app.route('/chat', methods=['POST']) def chat(): user_input = request.json.get('message') if user_input: bot_response = chatbot(user_input) response_text = bot_response[0]['generated_text'] return jsonify({'response': response_text}) return jsonify({'response': 'No input provided.'}), 400

if name == 'main': app.run(debug=True)

Popular repositories Loading

  1. SHARDA-VIHAR SHARDA-VIHAR Public

  2. PANKAJNAGAR433 PANKAJNAGAR433 Public

    Config files for my GitHub profile.