Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,14 +47,11 @@ def ask_phi(image, question):
|
|
47 |
|
48 |
new_token = generator.get_next_tokens()[0]
|
49 |
response += tokenizer_stream.decode(new_token) + " "
|
50 |
-
print(
|
51 |
|
52 |
total_run_time = time.time() - start_time
|
53 |
print(f"Total Time : {total_run_time:.2f}")
|
54 |
|
55 |
-
# Delete the generator to free the captured graph before creating another one
|
56 |
-
del generator
|
57 |
-
|
58 |
return response
|
59 |
|
60 |
# Gradio Interface
|
|
|
47 |
|
48 |
new_token = generator.get_next_tokens()[0]
|
49 |
response += tokenizer_stream.decode(new_token) + " "
|
50 |
+
print(response)
|
51 |
|
52 |
total_run_time = time.time() - start_time
|
53 |
print(f"Total Time : {total_run_time:.2f}")
|
54 |
|
|
|
|
|
|
|
55 |
return response
|
56 |
|
57 |
# Gradio Interface
|