Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,13 +16,13 @@ def app(file):
|
|
| 16 |
You're a moron.
|
| 17 |
""")
|
| 18 |
exit(1)
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
|
| 27 |
iface = gr.Interface(fn=app, inputs="file", outputs="text")
|
| 28 |
iface.launch()
|
|
|
|
| 16 |
You're a moron.
|
| 17 |
""")
|
| 18 |
exit(1)
|
| 19 |
+
with open(file.name, 'r') as f:
|
| 20 |
+
text = f.read()
|
| 21 |
+
batch_dict = process_dict(text, 20)
|
| 22 |
+
topic_dict = run_gpt_3(batch_dict, call3)
|
| 23 |
+
topic_text = clean_and_concatenate_dict_values(topic_dict)
|
| 24 |
+
result = call4(topic_text)
|
| 25 |
+
return result
|
| 26 |
|
| 27 |
iface = gr.Interface(fn=app, inputs="file", outputs="text")
|
| 28 |
iface.launch()
|