Spaces:
Sleeping
Sleeping
try to read_csv2
Browse filesFiles changed (3)
- .idea/workspace.xml+28
- app.py+36
- requirements.txtAdded+3
30 unmodified lines3132333435363738394041424344454647484950515253545556575859606162636430 unmodified lines <property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" /> </component> <component name="RunManager"> <configuration name="app" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> <envs> <env name="PYTHONUNBUFFERED" value="1" /> </envs> <option name="SDK_HOME" value="C:\Users\borod\AppData\Local\Programs\Python\Python37\python.exe" /> <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> <option name="IS_MODULE_SDK" value="false" /> <option name="ADD_CONTENT_ROOTS" value="true" /> <option name="ADD_SOURCE_ROOTS" value="true" /> <module name="" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/app.py" /> <option name="PARAMETERS" value="" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> <option name="MODULE_MODE" value="false" /> <option name="REDIRECT_INPUT" value="false" /> <option name="INPUT_FILE" value="" /> <method v="2" /> </configuration> <recent_temporary> <list> <item itemvalue="Python.app" /> </list> </recent_temporary> </component> <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> <component name="TaskManager"> <task active="true" id="Default" summary="Default task">12345678910111213141516171819202122232425262728293031323334353637383940import gradio as grfrom re import subfrom datasets import load_datasetimport pandas as pd
def clean_text(text): """ Applies some pre-processing on the given text.
Steps : - Lowering text - Removing backslashes - removes a. out of the answers - replaces 'b.', 'c.', and 'd.' with comma ',' """ text = text.lower() text = text.replace('\\', '') # generic replace was advised by Danit text = text.replace('a.', '') text = text.replace('b.', ',') text = text.replace('c.', ',') text = text.replace('d.', ',') text = sub("\d+", "<num>", text)
return ' '.join(text.split())
dataset = load_dataset( "csv", data_files={ "train": "https://huggingface.co/borodache/science-classification/resolve/main/subjects-questions.csv" }, use_auth_token=True,)
# df = pd.read_csv("/subjects-questions.csv")
def greet(name):123gradiodatasetspandas.idea/workspace.xml+28
app.py+36
requirements.txtAdded+3