eduardo-alvarez commited on
Commit
654a6ea
1 Parent(s): be7b294

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import pandas as pd
3
  import requests
4
  import os
 
5
 
6
  from info.train_a_model import (
7
  LLM_BENCHMARKS_TEXT)
@@ -51,7 +52,12 @@ with demo:
51
  #chat_model_selection = chat_model_dropdown.value
52
  chat_model_selection = 'Intel/neural-chat-7b-v1-1'
53
 
54
- gr.ChatInterface()
 
 
 
 
 
55
 
56
  #def call_api_and_stream_response(query, chat_model):
57
  # """
 
2
  import pandas as pd
3
  import requests
4
  import os
5
+ import time
6
 
7
  from info.train_a_model import (
8
  LLM_BENCHMARKS_TEXT)
 
52
  #chat_model_selection = chat_model_dropdown.value
53
  chat_model_selection = 'Intel/neural-chat-7b-v1-1'
54
 
55
+ def slow_echo(message, history):
56
+ for i in range(len(message)):
57
+ time.sleep(0.3)
58
+ yield "You typed: " + message[: i+1]
59
+
60
+ gr.ChatInterface(slow_echo).launch()
61
 
62
  #def call_api_and_stream_response(query, chat_model):
63
  # """