Code Monkey home page Code Monkey logo

chatbot_for_movies's Introduction

Hi ๐Ÿ‘‹, I'm Douglas

A passionate Software Quality Assurance Engineer and now a Python backend developer from Brazil

douglasdcm

trophy

  • ๐Ÿ”ญ Iโ€™m currently working on a personal project to help people to find jobs using AI. The project is called Vagas pra mim

  • ๐ŸŒฑ Iโ€™m currently learning Pyscript, Kubernetes, Flask, Nginx and Javascript (at least the basic)

  • ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available at here in GitHub

  • ๐Ÿ“ I regularly write articles on medium

  • ๐Ÿ’ฌ Ask me about Jmeter, Python and Selenium Webdriver

  • ๐Ÿ“„ Know about my experiences I have an undergraduate degree in Mathematics and graduate degree in Artificial Intelligence, IT Management and Software Designing. I have been working with software quality assurance since 2010. I have ISTQB CTFL and CTFL-Performance Testing certifications and I love to work with automated tests using Selenium, Jmeter and Postman. I am a dedicated person and focused on my responsibilities, I am comfortable either in individual activities as collectives. I love to study, to travel and to meet people. I use to live the life in a balanced and light way.

Blogs posts

Connect with me:

douglascardosom douglasdcm @douglas.dcm @testrock4634 douglas_morais

Languages and Tools:

azure bootstrap cassandra csharp css3 docker flask git heroku hive html5 jasmine java javascript jenkins jest kubernetes linux mocha mssql mysql oracle pandas postgresql postman python react scikit_learn selenium sqlite

douglasdcm

ย douglasdcm

douglasdcm

chatbot_for_movies's People

Contributors

douglasdcm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chatbot_for_movies's Issues

this was error in this part last line

conversation = get_the_next_conversation(conversations)
conversation

StopIteration Traceback (most recent call last)
in
----> 1 conversation = get_the_next_conversation(conversations)
2 conversation

in get_the_next_conversation(conversations)
3 keys_view = conversations.keys()
4 keys_iterator = iter(keys_view)
----> 5 conversation = next(keys_iterator)
6 return conversation

StopIteration:

file 4.01

msg_raw = 'I heard you are a good guy. Is it right?'
#msg_raw = 'yes i heard you all right 20000000 thats quite a lot isnt it'
msg = pre_processing_text(msg_raw)
print(msg)

with open('C:/Users/krima/OneDrive/Desktop/Essex/chatdata/tokenizer.pickle', 'rb') as handle:
tokenizer = pickle.load(handle)
p = tokenizer.texts_to_matrix([msg])

model = load_model('C:/Users/krima/OneDrive/Desktop/chatbot_for_movies-master/chatbot_for_movies-master/src/chatdata/model.h5')
res = model.predict(p)

print(res)

error

i heard you be a good guy be it right

ValueError Traceback (most recent call last)
in
9
10 model = load_model('C:/Users/krima/OneDrive/Desktop/chatbot_for_movies-master/chatbot_for_movies-master/src/chatdata/model.h5')
---> 11 res = model.predict(p)
12
13 print(res)

~\anaconda3\lib\site-packages\keras\engine\training.py in predict(self, x, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing)
1749 for step in data_handler.steps():
1750 callbacks.on_predict_batch_begin(step)
-> 1751 tmp_batch_outputs = self.predict_function(iterator)
1752 if data_handler.should_sync:
1753 context.async_wait()

~\anaconda3\lib\site-packages\tensorflow\python\eager\def_function.py in call(self, *args, **kwds)
883
884 with OptionalXlaContext(self._jit_compile):
--> 885 result = self._call(*args, **kwds)
886
887 new_tracing_count = self.experimental_get_tracing_count()

~\anaconda3\lib\site-packages\tensorflow\python\eager\def_function.py in _call(self, *args, **kwds)
931 # This is the first call of call, so we have to initialize.
932 initializers = []
--> 933 self._initialize(args, kwds, add_initializers_to=initializers)
934 finally:
935 # At this point we know that the initialization is complete (or less

~\anaconda3\lib\site-packages\tensorflow\python\eager\def_function.py in _initialize(self, args, kwds, add_initializers_to)
757 self._graph_deleter = FunctionDeleter(self._lifted_initializer_graph)
758 self._concrete_stateful_fn = (
--> 759 self._stateful_fn._get_concrete_function_internal_garbage_collected( # pylint: disable=protected-access
760 *args, **kwds))
761

~\anaconda3\lib\site-packages\tensorflow\python\eager\function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs)
3064 args, kwargs = None, None
3065 with self._lock:
-> 3066 graph_function, _ = self._maybe_define_function(args, kwargs)
3067 return graph_function
3068

~\anaconda3\lib\site-packages\tensorflow\python\eager\function.py in _maybe_define_function(self, args, kwargs)
3461
3462 self._function_cache.missed.add(call_context_key)
-> 3463 graph_function = self._create_graph_function(args, kwargs)
3464 self._function_cache.primary[cache_key] = graph_function
3465

~\anaconda3\lib\site-packages\tensorflow\python\eager\function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes)
3296 arg_names = base_arg_names + missing_arg_names
3297 graph_function = ConcreteFunction(
-> 3298 func_graph_module.func_graph_from_py_func(
3299 self._name,
3300 self._python_function,

~\anaconda3\lib\site-packages\tensorflow\python\framework\func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes, acd_record_initial_resource_uses)
1005 _, original_func = tf_decorator.unwrap(python_func)
1006
-> 1007 func_outputs = python_func(*func_args, **func_kwargs)
1008
1009 # invariant: func_outputs contains only Tensors, CompositeTensors,

~\anaconda3\lib\site-packages\tensorflow\python\eager\def_function.py in wrapped_fn(*args, **kwds)
666 # the function a weak reference to itself to avoid a reference cycle.
667 with OptionalXlaContext(compile_with_xla):
--> 668 out = weak_wrapped_fn().wrapped(*args, **kwds)
669 return out
670

~\anaconda3\lib\site-packages\tensorflow\python\framework\func_graph.py in wrapper(*args, **kwargs)
992 except Exception as e: # pylint:disable=broad-except
993 if hasattr(e, "ag_error_metadata"):
--> 994 raise e.ag_error_metadata.to_exception(e)
995 else:
996 raise

ValueError: in user code:

C:\Users\krima\anaconda3\lib\site-packages\keras\engine\training.py:1586 predict_function  *
    return step_function(self, iterator)
C:\Users\krima\anaconda3\lib\site-packages\keras\engine\training.py:1576 step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
C:\Users\krima\anaconda3\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:1286 run
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
C:\Users\krima\anaconda3\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2849 call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
C:\Users\krima\anaconda3\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:3632 _call_for_each_replica
    return fn(*args, **kwargs)
C:\Users\krima\anaconda3\lib\site-packages\keras\engine\training.py:1569 run_step  **
    outputs = model.predict_step(data)
C:\Users\krima\anaconda3\lib\site-packages\keras\engine\training.py:1537 predict_step
    return self(x, training=False)
C:\Users\krima\anaconda3\lib\site-packages\keras\engine\base_layer.py:1020 __call__
    input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
C:\Users\krima\anaconda3\lib\site-packages\keras\engine\input_spec.py:250 assert_input_compatibility
    raise ValueError(

ValueError: Input 0 of layer sequential_1 is incompatible with the layer: expected axis -1 of input shape to have value 9711 but received input with shape (None, 9805)

conversation = return_conversation_by_page_rank(msg, conversations, page_compute=pc_q) print('Conversation: '+ conversation) print('Page compute: '+ str(pc_q[conversation])) print('Similarity: '+ str(conversations[conversation]))

KeyError Traceback (most recent call last)
in
----> 1 conversation = return_conversation_by_page_rank(msg, conversations, page_compute=pc_q)
2 print('Conversation: '+ conversation)
3 print('Page compute: '+ str(pc_q[conversation]))
4 print('Similarity: '+ str(conversations[conversation]))

in return_conversation_by_page_rank(msg, conversations, page_compute)
7 result = dict()
8 for k, v in similarity.items():
----> 9 result[k] = page_compute[k] * v
10
11 result = {k: v for k, v in sorted(result.items(), key=lambda item: item[1], reverse=True)}

KeyError: 'yes thats right'

--------------------------------------------------------------------------- StopIteration Traceback (most recent call last) <ipython-input-63-d5e9e2d65296> in <module> ----> 1 conversation = get_the_next_conversation(conversations) 2 conversation <ipython-input-45-cdb994193f4c> in get_the_next_conversation(conversations) 3 keys_view = conversations.keys() 4 keys_iterator = iter(keys_view) ----> 5 conversation = next(keys_iterator) 6 return conversation StopIteration:


StopIteration Traceback (most recent call last)
in
----> 1 conversation = get_the_next_conversation(conversations)
2 conversation

in get_the_next_conversation(conversations)
3 keys_view = conversations.keys()
4 keys_iterator = iter(keys_view)
----> 5 conversation = next(keys_iterator)
6 return conversation

StopIteration:

this was an erroe

-------------------------------------------------------------- StopIteration Traceback (most recent call last) in ----> 1 conversation = get_the_next_conversation(conversations) 2 conversation in get_the_next_conversation(conversations) 3 keys_view = conversations.keys() 4 keys_iterator = iter(keys_view) ----> 5 conversation = next(keys_iterator) 6 return conversation StopIteration: #3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.