<commit_before>from flask import Flask, request, redirect
import twilio.twiml
from twilio.rest import TwilioRestClient

app = Flask(__name__)


#<<<<<<< HEAD
account_sid = "<KEY>"
auth_token  = "1<PASSWORD>"
client = TwilioRestClient(account_sid, auth_token)
 
request_data = {}
#=======
#>>>>>>> 49fa5eed2a974804a1651e7dd21fd0616a6553c0
# Try adding your own number to this list!
callers = {
    "+12014463242": "Jane",
    "+16467633964": "Lisa",
    "+13046462355": "Melissa"
}


@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
    """Say a caller's name, and play an MP3 for them."""

    from_number = request.values.get('From', None)
    if from_number in callers:
        caller = callers[from_number]
    else:
        caller = "Monkey"

    resp = twilio.twiml.Response()
    # Greet the caller by name
    resp.say("Do you identify with Beyonce-ay or <NAME>?")
    # Play an MP3
    #resp.play("https://s3.amazonaws.com/yonce/upgradeu.mp3")
    resp.record(maxLength="2", transcribeCallback="/transcribed",  action="/handle-recording")
    return str(resp)


@app.route("/handle-recording", methods=['GET'])
def handle_recording():
 	transcription = request_data["TranscriptionText"]
	resp = twilio.twiml.Response()
	resp.say(transcription)
	return str(resp)


@app.route("/transcribed", methods=['POST'])
def transcribed():
 	request_data = json.loads(request.data)



<commit_msg>debugs<commit_after>from flask import Flask, request, redirect
import twilio.twiml
from twilio.rest import TwilioRestClient

app = Flask(__name__)


#<<<<<<< HEAD
account_sid = "<KEY>"
auth_token  = "1<PASSWORD>"
client = TwilioRestClient(account_sid, auth_token)
 
request_data = {}
#=======
#>>>>>>> 49fa5eed2a974804a1651e7dd21fd0616a6553c0
# Try adding your own number to this list!
callers = {
    "+12014463242": "Jane",
    "+16467633964": "Lisa",
    "+13046462355": "Melissa"
}


@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
    """Say a caller's name, and play an MP3 for them."""

    from_number = request.values.get('From', None)
    if from_number in callers:
        caller = callers[from_number]
    else:
        caller = "Monkey"

    resp = twilio.twiml.Response()
    # Greet the caller by name
    resp.say("Do you identify with Beyonce-ay or <NAME>?")
    # Play an MP3
    #resp.play("https://s3.amazonaws.com/yonce/upgradeu.mp3")
    resp.record(maxLength="2", transcribeCallback="/transcribed")
    return str(resp)

'''
@app.route("/handle-recording", methods=['GET'])
def handle_recording():
 	transcription = request_data["TranscriptionText"]
	resp = twilio.twiml.Response()
	resp.say(transcription)
	return str(resp)
'''

@app.route("/transcribed", methods=['POST'])
def transcribed():
 	request_data = json.loads(request.data)
 	transcription = request_data["TranscriptionText"]
	resp = twilio.twiml.Response()
	resp.say(transcription)
	return str(resp)




{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.044719642242862054, 'mean_word_length': 4.486792452830189, 'pattern_counts': {'":': 6, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '541295', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1006, 'n_words': 218}